Skip to content

Commit 5d6d61b

Browse files
Update to v0.15.0 (#142)
* Update to CI to use 'unstable' purescript * Update pulp to 16.0.0-0 and psa to 0.8.2 * Update Bower dependencies to master * Migrated FFI to ES modules via 'lebab' * Fix compiler warnings * Added changelog entry * Fix ad hoc case of syntax warning
1 parent 95c4e7e commit 5d6d61b

File tree

11 files changed

+37
-34
lines changed

11 files changed

+37
-34
lines changed

.github/workflows/ci.yml

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
- uses: actions/checkout@v2
1414

1515
- uses: purescript-contrib/setup-purescript@main
16+
with:
17+
purescript: "unstable"
1618

1719
- uses: actions/setup-node@v1
1820
with:

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Notable changes to this project are documented in this file. The format is based
55
## [Unreleased]
66

77
Breaking changes:
8+
- Update project and deps to PureScript v0.15.0 (#142 by @JordanMartinez)
89

910
New features:
1011
- Add `Foldable`, `FoldableWithIndex`, and `Traversable` instances for `EnvT` (#113 by @abaco)

bower.json

+16-16
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,23 @@
2323
"package.json"
2424
],
2525
"dependencies": {
26-
"purescript-control": "^5.0.0",
27-
"purescript-distributive": "^5.0.0",
28-
"purescript-effect": "^3.0.0",
29-
"purescript-either": "^5.0.0",
30-
"purescript-exceptions": "^5.0.0",
31-
"purescript-foldable-traversable": "^5.0.0",
32-
"purescript-identity": "^5.0.0",
33-
"purescript-lazy": "^5.0.0",
34-
"purescript-maybe": "^5.0.0",
35-
"purescript-newtype": "^4.0.0",
36-
"purescript-prelude": "^5.0.0",
37-
"purescript-tailrec": "^5.0.0",
38-
"purescript-tuples": "^6.0.0",
39-
"purescript-unfoldable": "^5.0.0"
26+
"purescript-control": "master",
27+
"purescript-distributive": "master",
28+
"purescript-effect": "master",
29+
"purescript-either": "master",
30+
"purescript-exceptions": "master",
31+
"purescript-foldable-traversable": "master",
32+
"purescript-identity": "master",
33+
"purescript-lazy": "master",
34+
"purescript-maybe": "master",
35+
"purescript-newtype": "master",
36+
"purescript-prelude": "master",
37+
"purescript-tailrec": "master",
38+
"purescript-tuples": "master",
39+
"purescript-unfoldable": "master"
4040
},
4141
"devDependencies": {
42-
"purescript-arrays": "^6.0.0",
43-
"purescript-console": "^5.0.0"
42+
"purescript-arrays": "master",
43+
"purescript-console": "master"
4444
}
4545
}

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"test": "pulp test"
77
},
88
"devDependencies": {
9-
"pulp": "^15.0.0",
10-
"purescript-psa": "^0.8.0",
9+
"pulp": "16.0.0-0",
10+
"purescript-psa": "^0.8.2",
1111
"rimraf": "^3.0.2"
1212
}
1313
}

src/Control/Monad/Except/Trans.purs

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ instance monadExceptT :: Monad m => Monad (ExceptT e m)
7070

7171
instance monadRecExceptT :: MonadRec m => MonadRec (ExceptT e m) where
7272
tailRecM f = ExceptT <<< tailRecM \a ->
73-
case f a of ExceptT m ->
74-
m >>= \m' ->
73+
case f a of
74+
ExceptT m -> m >>= \m' ->
7575
pure case m' of
7676
Left e -> Done (Left e)
7777
Right (Loop a1) -> Loop a1

src/Control/Monad/Maybe/Trans.purs

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ instance monadZeroMaybeT :: Monad m => MonadZero (MaybeT m)
8080
instance monadRecMaybeT :: MonadRec m => MonadRec (MaybeT m) where
8181
tailRecM f =
8282
MaybeT <<< tailRecM \a ->
83-
case f a of MaybeT m ->
84-
m >>= \m' ->
83+
case f a of
84+
MaybeT m -> m >>= \m' ->
8585
pure case m' of
8686
Nothing -> Done Nothing
8787
Just (Loop a1) -> Loop a1

src/Control/Monad/RWS/Trans.purs

+4-4
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,12 @@ instance monadTellRWST :: (Monad m, Monoid w) => MonadTell w (RWST r w s m) wher
101101

102102
instance monadWriterRWST :: (Monad m, Monoid w) => MonadWriter w (RWST r w s m) where
103103
listen m = RWST \r s ->
104-
case m of RWST m' ->
105-
m' r s >>= \(RWSResult s' a w) ->
104+
case m of
105+
RWST m' -> m' r s >>= \(RWSResult s' a w) ->
106106
pure $ RWSResult s' (Tuple a w) w
107107
pass m = RWST \r s ->
108-
case m of RWST m' ->
109-
m' r s >>= \(RWSResult s' (Tuple a f) w) ->
108+
case m of
109+
RWST m' -> m' r s >>= \(RWSResult s' (Tuple a f) w) ->
110110
pure $ RWSResult s' a (f w)
111111

112112
instance monadThrowRWST :: (MonadThrow e m, Monoid w) => MonadThrow e (RWST r w s m) where

src/Control/Monad/State/Trans.purs

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ instance monadRecStateT :: MonadRec m => MonadRec (StateT s m) where
8383
tailRecM f a = StateT \s -> tailRecM f' (Tuple a s)
8484
where
8585
f' (Tuple a' s) =
86-
case f a' of StateT st ->
87-
st s >>= \(Tuple m s1) ->
86+
case f a' of
87+
StateT st -> st s >>= \(Tuple m s1) ->
8888
pure case m of
8989
Loop x -> Loop (Tuple x s1)
9090
Done y -> Done (Tuple y s1)

src/Control/Monad/Writer/Trans.purs

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ instance monadRecWriterT :: (Monoid w, MonadRec m) => MonadRec (WriterT w m) whe
7979
tailRecM f a = WriterT $ tailRecM f' (Tuple a mempty)
8080
where
8181
f' (Tuple a' w) =
82-
case f a' of WriterT wt ->
83-
wt >>= \(Tuple m w1) ->
82+
case f a' of
83+
WriterT wt -> wt >>= \(Tuple m w1) ->
8484
pure case m of
8585
Loop x -> Loop (Tuple x (w <> w1))
8686
Done y -> Done (Tuple y (w <> w1))

test/Example/RWS.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// module Example.RWS
22

3-
exports.t = function(){
3+
export function t() {
44
return new Date().valueOf();
5-
};
5+
}

test/Example/RWS.purs

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ loopState n = tailRecM go n
3535
main :: Effect Unit
3636
main = do
3737
t1 <- t
38-
res1 <- pure $ unwrap (runRWST (loop 1000000) "" 0)
38+
_ <- pure $ unwrap (runRWST (loop 1000000) "" 0)
3939
t2 <- t
4040
log $ "RWST: " <> show (t2 - t1)
4141
t3 <- t
42-
res2 <- pure $ execState (loopState 1000000) 0
42+
_ <- pure $ execState (loopState 1000000) 0
4343
t4 <- t
4444
log $ "StateT: " <> show (t4 - t3)
4545

0 commit comments

Comments
 (0)