Skip to content

Commit 14d44f1

Browse files
committed
Migrate to 0.12
1 parent 80ee558 commit 14d44f1

File tree

9 files changed

+28
-28
lines changed

9 files changed

+28
-28
lines changed

bower.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,13 @@
1515
"package.json"
1616
],
1717
"dependencies": {
18-
"purescript-fixed-points": "^4.0.0",
19-
"purescript-free": "^4.0.0",
20-
"purescript-transformers": "^3.0.0",
21-
"purescript-profunctor": "^3.0.0"
18+
"purescript-prelude": "^4.0.0",
19+
"purescript-fixed-points": "^5.0.0",
20+
"purescript-free": "^5.0.0",
21+
"purescript-transformers": "^4.1.0",
22+
"purescript-profunctor": "^4.0.0"
2223
},
2324
"devDependencies": {
24-
"purescript-console": "^3.0.0"
25+
"purescript-console": "^4.1.0"
2526
}
2627
}

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
"test": "pulp test -- --censor-lib --strict"
77
},
88
"devDependencies": {
9-
"pulp": "^11.0.0",
10-
"purescript": "^0.11.3",
11-
"purescript-psa": "^0.5.0",
12-
"rimraf": "^2.5.4"
9+
"pulp": "^12.2.0",
10+
"purescript": "slamdata/node-purescript#0.12",
11+
"purescript-psa": "^0.6.0",
12+
"rimraf": "^2.6.2"
1313
}
1414
}

src/Matryoshka/DistributiveLaw.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ distZygoT g k fe =
7373
EnvT $ Tuple (g (fst <<< runEnvT <$> fe)) (k (lower <$> fe))
7474

7575
distHisto f. Functor f DistributiveLaw f (Cofree f)
76-
distHisto = distGHisto id
76+
distHisto = distGHisto identity
7777

7878
distGHisto
7979
f h
@@ -102,7 +102,7 @@ distGApoT
102102
distGApoT g k = map ExceptT <<< k <<< map (distGApo g) <<< runExceptT
103103

104104
distFutu f. Functor f DistributiveLaw (Free f) f
105-
distFutu = distGFutu id
105+
distFutu = distGFutu identity
106106

107107
distGFutu
108108
f h

src/Matryoshka/Fold.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ transPara
251251
u
252252
transPara f = go
253253
where
254-
go t = mapR (f <<< map (id &&& go)) t
254+
go t = mapR (f <<< map (identity &&& go)) t
255255

256256
transParaT
257257
t f

src/Matryoshka/Refold.purs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import Control.Monad.Free (Free)
2424

2525
import Data.Identity (Identity(..))
2626
import Data.Newtype (unwrap)
27-
import Data.Profunctor (lmap)
27+
import Data.Profunctor (lcmap)
2828
import Data.Traversable (class Traversable, traverse)
2929

3030
import Matryoshka.Algebra (Algebra, AlgebraM, GAlgebra, GAlgebraM)
@@ -121,7 +121,7 @@ codyna
121121
GCoalgebra (Free f) f a
122122
a
123123
b
124-
codyna f = ghylo distCata distFutu (lmap (map unwrap) f)
124+
codyna f = ghylo distCata distFutu (lcmap (map unwrap) f)
125125

126126
codynaM
127127
f m a b
@@ -131,7 +131,7 @@ codynaM
131131
GCoalgebraM (Free f) m f a
132132
a
133133
m b
134-
codynaM f = ghyloM distCata distFutu (lmap (map unwrap) f)
134+
codynaM f = ghyloM distCata distFutu (lcmap (map unwrap) f)
135135

136136
chrono
137137
f a b

src/Matryoshka/Unfold.purs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ transPostpro f g = go
169169
apo t f a. Corecursive t f GCoalgebra (Either t) f a a t
170170
apo f = go
171171
where
172-
go a = embed $ either id go <$> f a
172+
go a = embed $ either identity go <$> f a
173173

174174
gapo
175175
t f a b
@@ -198,7 +198,7 @@ apoM f = go
198198
elgotApo t f a. Corecursive t f ElgotCoalgebra (Either t) f a a t
199199
elgotApo f = go
200200
where
201-
go a = either id (embed <<< map go) $ f a
201+
go a = either identity (embed <<< map go) $ f a
202202

203203
transApo
204204
t f u g
@@ -209,7 +209,7 @@ transApo
209209
u
210210
transApo f = go
211211
where
212-
go t = mapR (map (either id go) <<< f) t
212+
go t = mapR (map (either identity go) <<< f) t
213213

214214
transApoT
215215
t f
@@ -220,7 +220,7 @@ transApoT
220220
t
221221
transApoT f = go
222222
where
223-
go t = either id (mapR (map go)) $ f t
223+
go t = either identity (mapR (map go)) $ f t
224224

225225
futu t f a. Corecursive t f GCoalgebra (Free f) f a a t
226226
futu = gana distFutu

test/Test/Example/Expr.purs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module Test.Example.Expr where
22

3-
import Control.Monad.Eff (Eff)
4-
import Control.Monad.Eff.Console (CONSOLE, log, logShow)
3+
import Effect (Effect)
4+
import Effect.Console (log, logShow)
55
import Data.Functor.Mu (Mu)
66
import Matryoshka (class Corecursive, class Recursive, Algebra, cata, embed)
77
import Prelude hiding (mul)
@@ -28,7 +28,7 @@ someExpr = mul (num 2) (mul (num 3) (num 4))
2828

2929
type Expr = Mu ExprF
3030

31-
exprExample :: forall t. Eff (console :: CONSOLE | t) Unit
31+
exprExample :: Effect Unit
3232
exprExample = do
3333
log "expr example"
3434
logShow $ evalExpr (someExpr :: Expr)

test/Test/Example/List.purs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ module Test.Example.List where
22

33
import Prelude
44

5-
import Control.Monad.Eff (Eff)
6-
import Control.Monad.Eff.Console (CONSOLE, log, logShow)
5+
import Effect (Effect)
6+
import Effect.Console (log, logShow)
77

88
import Data.Functor.Mu (Mu)
99
import Data.TacitString (TacitString)
@@ -36,7 +36,7 @@ fac = hylo prod count
3636

3737
type List a = Mu (ListF a)
3838

39-
listExample :: forall t. Eff (console :: CONSOLE | t) Unit
39+
listExample :: Effect Unit
4040
listExample = do
4141
log "list example"
4242
let someList = cons 1 (cons 2 (cons 3 (cons 4 nil)))

test/Test/Main.purs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
module Test.Main where
22

33
import Prelude
4-
import Control.Monad.Eff (Eff)
5-
import Control.Monad.Eff.Console (CONSOLE)
4+
import Effect (Effect)
65
import Test.Example.Expr (exprExample)
76
import Test.Example.List (listExample)
87

9-
main :: forall t. Eff ( console :: CONSOLE | t) Unit
8+
main :: Effect Unit
109
main = do
1110
exprExample
1211
listExample

0 commit comments

Comments
 (0)