Skip to content

Commit a2309ad

Browse files
committed
Update dependencies and tests
1 parent eaf3d06 commit a2309ad

File tree

3 files changed

+51
-51
lines changed

3 files changed

+51
-51
lines changed

bower.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@
1717
"package.json"
1818
],
1919
"dependencies": {
20-
"purescript-exceptions": "#compiler/0.12",
21-
"purescript-functions": "#compiler/0.12",
22-
"purescript-parallel": "#compiler/0.12",
23-
"purescript-transformers": "#compiler/0.12",
24-
"purescript-unsafe-coerce": "#compiler/0.12",
25-
"purescript-datetime": "#compiler/0.12",
26-
"purescript-effect": "#compiler/0.12"
20+
"purescript-exceptions": "^4.0.0",
21+
"purescript-functions": "^4.0.0",
22+
"purescript-parallel": "^4.0.0",
23+
"purescript-transformers": "^4.0.0",
24+
"purescript-unsafe-coerce": "^4.0.0",
25+
"purescript-datetime": "^4.0.0",
26+
"purescript-effect": "^2.0.0"
2727
},
2828
"devDependencies": {
29-
"purescript-console": "#compiler/0.12",
30-
"purescript-partial": "#compiler/0.12",
31-
"purescript-minibench": "#compiler/0.12",
32-
"purescript-assert": "#compiler/0.12",
33-
"purescript-free": "#compiler/0.12"
29+
"purescript-console": "^4.1.0",
30+
"purescript-partial": "^2.0.0",
31+
"purescript-minibench": "^2.0.0",
32+
"purescript-assert": "^4.0.0",
33+
"purescript-free": "^5.0.0"
3434
}
3535
}

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
},
88
"devDependencies": {
99
"jscs": "^3.0.7",
10-
"jshint": "^2.9.4",
11-
"pulp": "^12.0.0",
12-
"purescript-psa": "^0.5.0",
13-
"purescript": "^0.12.0-rc1",
14-
"rimraf": "^2.5.4"
10+
"jshint": "^2.9.5",
11+
"pulp": "^12.2.0",
12+
"purescript-psa": "^0.6.0",
13+
"purescript": "slamdata/node-purescript#0.12",
14+
"rimraf": "^2.6.2"
1515
},
1616
"jscsConfig": {
1717
"validateIndentation": false

test/Test/Main.purs

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ readRef = liftEffect <<< Ref.read
3333
writeRef m a. MonadEffect m Ref a a m Unit
3434
writeRef r = liftEffect <<< flip Ref.write r
3535

36-
modifyRef m a. MonadEffect m Ref a (a a) m Unit
36+
modifyRef m a. MonadEffect m Ref a (a a) m a
3737
modifyRef r = liftEffect <<< flip Ref.modify r
3838

3939
assertEff String Either Error Boolean Effect Unit
@@ -102,19 +102,19 @@ test_fork = assert "fork" do
102102
fiber ← forkAff do
103103
delay (Milliseconds 10.0)
104104
modifyRef ref (_ <> "child")
105-
modifyRef ref (_ <> "go")
105+
_ ← modifyRef ref (_ <> "go")
106106
delay (Milliseconds 20.0)
107-
modifyRef ref (_ <> "parent")
107+
_ ← modifyRef ref (_ <> "parent")
108108
eq "gochildparent" <$> readRef ref
109109

110110
test_join Aff Unit
111111
test_join = assert "join" do
112112
ref ← newRef ""
113113
fiber ← forkAff do
114114
delay (Milliseconds 10.0)
115-
modifyRef ref (_ <> "child")
115+
_ ← modifyRef ref (_ <> "child")
116116
readRef ref
117-
modifyRef ref (_ <> "parent")
117+
_ ← modifyRef ref (_ <> "parent")
118118
eq "parentchild" <$> joinFiber fiber
119119

120120
test_join_throw Aff Unit
@@ -134,11 +134,11 @@ test_multi_join = assert "join/multi" do
134134
ref ← newRef 1
135135
f1 ← forkAff do
136136
delay (Milliseconds 10.0)
137-
modifyRef ref (_ + 1)
137+
_ ← modifyRef ref (_ + 1)
138138
pure 10
139139
f2 ← forkAff do
140140
delay (Milliseconds 20.0)
141-
modifyRef ref (_ + 1)
141+
_ ← modifyRef ref (_ + 1)
142142
pure 20
143143
n1 ← traverse joinFiber
144144
[ f1
@@ -155,9 +155,9 @@ test_suspend = assert "suspend" do
155155
fiber ← suspendAff do
156156
delay (Milliseconds 10.0)
157157
modifyRef ref (_ <> "child")
158-
modifyRef ref (_ <> "go")
158+
_ ← modifyRef ref (_ <> "go")
159159
delay (Milliseconds 20.0)
160-
modifyRef ref (_ <> "parent")
160+
_ ← modifyRef ref (_ <> "parent")
161161
_ ← joinFiber fiber
162162
eq "goparentchild" <$> readRef ref
163163

@@ -185,7 +185,7 @@ test_bracket = assert "bracket" do
185185
let
186186
action s = do
187187
delay (Milliseconds 10.0)
188-
modifyRef ref (_ <> [ s ])
188+
_ ← modifyRef ref (_ <> [ s ])
189189
pure s
190190
fiber ← forkAff do
191191
delay (Milliseconds 40.0)
@@ -206,7 +206,7 @@ test_bracket_nested = assert "bracket/nested" do
206206
let
207207
action s = do
208208
delay (Milliseconds 10.0)
209-
modifyRef ref (_ <> [ s ])
209+
_ ← modifyRef ref (_ <> [ s ])
210210
pure s
211211
bracketAction s =
212212
bracket
@@ -235,7 +235,7 @@ test_general_bracket = assert "bracket/general" do
235235
let
236236
action s = do
237237
delay (Milliseconds 10.0)
238-
modifyRef ref (_ <> s)
238+
_ ← modifyRef ref (_ <> s)
239239
pure s
240240
bracketAction s =
241241
generalBracket (action s)
@@ -265,13 +265,13 @@ test_supervise = assert "supervise" do
265265
_ ← forkAff do
266266
bracket
267267
(modifyRef ref (_ <> "acquire"))
268-
(\_ → modifyRef ref (_ <> "release"))
268+
(\_ → void $ modifyRef ref (_ <> "release"))
269269
(\_ → delay (Milliseconds 10.0))
270270
_ ← forkAff do
271271
delay (Milliseconds 11.0)
272-
modifyRef ref (_ <> "delay")
272+
void $ modifyRef ref (_ <> "delay")
273273
delay (Milliseconds 5.0)
274-
modifyRef ref (_ <> "done")
274+
_ ← modifyRef ref (_ <> "done")
275275
pure "done"
276276
delay (Milliseconds 20.0)
277277
r2 ← readRef ref
@@ -303,7 +303,7 @@ test_kill_bracket = assert "kill/bracket" do
303303
let
304304
action n = do
305305
delay (Milliseconds 10.0)
306-
modifyRef ref (_ <> n)
306+
void $ modifyRef ref (_ <> n)
307307
fiber ←
308308
forkAff $ bracket
309309
(action "a")
@@ -320,7 +320,7 @@ test_kill_bracket_nested = assert "kill/bracket/nested" do
320320
let
321321
action s = do
322322
delay (Milliseconds 10.0)
323-
modifyRef ref (_ <> [ s ])
323+
_ ← modifyRef ref (_ <> [ s ])
324324
pure s
325325
bracketAction s =
326326
bracket
@@ -350,13 +350,13 @@ test_kill_supervise = assert "kill/supervise" do
350350
let
351351
action s = generalBracket
352352
(modifyRef ref (_ <> "acquire" <> s))
353-
{ failed: \_ _ → modifyRef ref (_ <> "throw" <> s)
354-
, killed: \_ _ → modifyRef ref (_ <> "kill" <> s)
355-
, completed: \_ _ → modifyRef ref (_ <> "complete" <> s)
353+
{ failed: \_ _ → void $ modifyRef ref (_ <> "throw" <> s)
354+
, killed: \_ _ → void $ modifyRef ref (_ <> "kill" <> s)
355+
, completed: \_ _ → void $ modifyRef ref (_ <> "complete" <> s)
356356
}
357357
(\_ -> do
358358
delay (Milliseconds 10.0)
359-
modifyRef ref (_ <> "child" <> s))
359+
void $ modifyRef ref (_ <> "child" <> s))
360360
fiber ← forkAff $ supervise do
361361
_ ← forkAff $ action "foo"
362362
_ ← forkAff $ action "bar"
@@ -398,7 +398,7 @@ test_parallel = assert "parallel" do
398398
let
399399
action s = do
400400
delay (Milliseconds 10.0)
401-
modifyRef ref (_ <> s)
401+
_ ← modifyRef ref (_ <> s)
402402
pure s
403403
f1 ← forkAff $ sequential $
404404
{ a: _, b: _ }
@@ -415,7 +415,7 @@ test_parallel_throw = assert "parallel/throw" $ withTimeout (Milliseconds 100.0)
415415
let
416416
action n s = do
417417
delay (Milliseconds n)
418-
modifyRef ref (_ <> s)
418+
_ ← modifyRef ref (_ <> s)
419419
pure s
420420
r1 ← try $ sequential $
421421
{ a: _, b: _ }
@@ -431,10 +431,10 @@ test_kill_parallel = assert "kill/parallel" do
431431
action s = do
432432
bracket
433433
(pure unit)
434-
(\_ → modifyRef ref (_ <> "killed" <> s))
434+
(\_ → void $ modifyRef ref (_ <> "killed" <> s))
435435
(\_ → do
436436
delay (Milliseconds 10.0)
437-
modifyRef ref (_ <> s))
437+
void $ modifyRef ref (_ <> s))
438438
f1 ← forkAff $ sequential $
439439
parallel (action "foo") *> parallel (action "bar")
440440
f2 ← forkAff do
@@ -451,7 +451,7 @@ test_parallel_alt = assert "parallel/alt" do
451451
let
452452
action n s = do
453453
delay (Milliseconds n)
454-
modifyRef ref (_ <> s)
454+
_ ← modifyRef ref (_ <> s)
455455
pure s
456456
f1 ← forkAff $ sequential $
457457
parallel (action 10.0 "foo") <|> parallel (action 5.0 "bar")
@@ -475,7 +475,7 @@ test_parallel_alt_sync = assert "parallel/alt/sync" do
475475
action s = do
476476
bracket
477477
(pure unit)
478-
(\_ → modifyRef ref (_ <> "killed" <> s))
478+
(\_ → void $ modifyRef ref (_ <> "killed" <> s))
479479
(\_ → modifyRef ref (_ <> s) $> s)
480480
r1 ← sequential $
481481
parallel (action "foo")
@@ -490,7 +490,7 @@ test_parallel_mixed = assert "parallel/mixed" do
490490
let
491491
action n s = parallel do
492492
delay (Milliseconds n)
493-
modifyRef ref (_ <> s)
493+
_ ← modifyRef ref (_ <> s)
494494
pure s
495495
{ r1, r2, r3 } ← sequential $
496496
{ r1: _, r2: _, r3: _ }
@@ -512,10 +512,10 @@ test_kill_parallel_alt = assert "kill/parallel/alt" do
512512
action n s = do
513513
bracket
514514
(pure unit)
515-
(\_ → modifyRef ref (_ <> "killed" <> s))
515+
(\_ → void $ modifyRef ref (_ <> "killed" <> s))
516516
(\_ → do
517517
delay (Milliseconds n)
518-
modifyRef ref (_ <> s))
518+
void $ modifyRef ref (_ <> s))
519519
f1 ← forkAff $ sequential $
520520
parallel (action 10.0 "foo") <|> parallel (action 20.0 "bar")
521521
f2 ← forkAff do
@@ -535,7 +535,7 @@ test_kill_parallel_alt_finalizer = assert "kill/parallel/alt/finalizer" do
535535
(pure unit)
536536
(\_ → do
537537
delay (Milliseconds 10.0)
538-
modifyRef ref (_ <> "killed"))
538+
void $ modifyRef ref (_ <> "killed"))
539539
(\_ → delay (Milliseconds 20.0))
540540
f2 ← forkAff do
541541
delay (Milliseconds 15.0)
@@ -550,7 +550,7 @@ test_fiber_map = assert "fiber/map" do
550550
ref ← newRef 0
551551
let
552552
mapFn a = unsafePerformEffect do
553-
Ref.modify (_ + 1) ref
553+
_ ← Ref.modify (_ + 1) ref
554554
pure (a + 1)
555555
f1 ← forkAff do
556556
delay (Milliseconds 10.0)
@@ -567,7 +567,7 @@ test_fiber_apply = assert "fiber/apply" do
567567
ref ← newRef 0
568568
let
569569
applyFn a b = unsafePerformEffect do
570-
Ref.modify (_ + 1) ref
570+
_ ← Ref.modify (_ + 1) ref
571571
pure (a + b)
572572
f1 ← forkAff do
573573
delay (Milliseconds 10.0)
@@ -592,7 +592,7 @@ test_efffn = assert "efffn" do
592592
runAff_ (either (AC.runEffectFn1 cke) (AC.runEffectFn1 ckc)) (killFiber e fiber)
593593
action = do
594594
effectDelay (Milliseconds 10.0)
595-
modifyRef ref (_ <> "done")
595+
void $ modifyRef ref (_ <> "done")
596596
f1 ← forkAff action
597597
f2 ← forkAff action
598598
killFiber (error "Nope.") f2

0 commit comments

Comments
 (0)