diff --git a/bower.json b/bower.json index 787100c..a206877 100644 --- a/bower.json +++ b/bower.json @@ -15,12 +15,13 @@ "package.json" ], "dependencies": { - "purescript-fixed-points": "^4.0.0", - "purescript-free": "^4.0.0", - "purescript-transformers": "^3.0.0", - "purescript-profunctor": "^3.0.0" + "purescript-prelude": "^4.0.0", + "purescript-fixed-points": "^5.0.0", + "purescript-free": "^5.0.0", + "purescript-transformers": "^4.1.0", + "purescript-profunctor": "^4.0.0" }, "devDependencies": { - "purescript-console": "^3.0.0" + "purescript-console": "^4.1.0" } } diff --git a/package.json b/package.json index 312b8a7..958bafc 100644 --- a/package.json +++ b/package.json @@ -6,9 +6,9 @@ "test": "pulp test -- --censor-lib --strict" }, "devDependencies": { - "pulp": "^11.0.0", - "purescript": "^0.11.3", - "purescript-psa": "^0.5.0", - "rimraf": "^2.5.4" + "pulp": "^12.2.0", + "purescript": "0.12", + "purescript-psa": "^0.6.0", + "rimraf": "^2.6.2" } } diff --git a/src/Matryoshka/DistributiveLaw.purs b/src/Matryoshka/DistributiveLaw.purs index dd16276..472f8aa 100644 --- a/src/Matryoshka/DistributiveLaw.purs +++ b/src/Matryoshka/DistributiveLaw.purs @@ -73,7 +73,7 @@ distZygoT g k fe = EnvT $ Tuple (g (fst <<< runEnvT <$> fe)) (k (lower <$> fe)) distHisto ∷ ∀ f. Functor f ⇒ DistributiveLaw f (Cofree f) -distHisto = distGHisto id +distHisto = distGHisto identity distGHisto ∷ ∀ f h @@ -102,7 +102,7 @@ distGApoT distGApoT g k = map ExceptT <<< k <<< map (distGApo g) <<< runExceptT distFutu ∷ ∀ f. Functor f ⇒ DistributiveLaw (Free f) f -distFutu = distGFutu id +distFutu = distGFutu identity distGFutu ∷ ∀ f h diff --git a/src/Matryoshka/Fold.purs b/src/Matryoshka/Fold.purs index b1b4781..10dda30 100644 --- a/src/Matryoshka/Fold.purs +++ b/src/Matryoshka/Fold.purs @@ -251,7 +251,7 @@ transPara → u transPara f = go where - go t = mapR (f <<< map (id &&& go)) t + go t = mapR (f <<< map (identity &&& go)) t transParaT ∷ ∀ t f diff --git a/src/Matryoshka/Refold.purs b/src/Matryoshka/Refold.purs index aaa2b34..3914627 100644 --- a/src/Matryoshka/Refold.purs +++ b/src/Matryoshka/Refold.purs @@ -24,7 +24,7 @@ import Control.Monad.Free (Free) import Data.Identity (Identity(..)) import Data.Newtype (unwrap) -import Data.Profunctor (lmap) +import Data.Profunctor (lcmap) import Data.Traversable (class Traversable, traverse) import Matryoshka.Algebra (Algebra, AlgebraM, GAlgebra, GAlgebraM) @@ -121,7 +121,7 @@ codyna → GCoalgebra (Free f) f a → a → b -codyna f = ghylo distCata distFutu (lmap (map unwrap) f) +codyna f = ghylo distCata distFutu (lcmap (map unwrap) f) codynaM ∷ ∀ f m a b @@ -131,7 +131,7 @@ codynaM → GCoalgebraM (Free f) m f a → a → m b -codynaM f = ghyloM distCata distFutu (lmap (map unwrap) f) +codynaM f = ghyloM distCata distFutu (lcmap (map unwrap) f) chrono ∷ ∀ f a b diff --git a/src/Matryoshka/Unfold.purs b/src/Matryoshka/Unfold.purs index 3b8b68c..475ee19 100644 --- a/src/Matryoshka/Unfold.purs +++ b/src/Matryoshka/Unfold.purs @@ -169,7 +169,7 @@ transPostpro f g = go apo ∷ ∀ t f a. Corecursive t f ⇒ GCoalgebra (Either t) f a → a → t apo f = go where - go a = embed $ either id go <$> f a + go a = embed $ either identity go <$> f a gapo ∷ ∀ t f a b @@ -198,7 +198,7 @@ apoM f = go elgotApo ∷ ∀ t f a. Corecursive t f ⇒ ElgotCoalgebra (Either t) f a → a → t elgotApo f = go where - go a = either id (embed <<< map go) $ f a + go a = either identity (embed <<< map go) $ f a transApo ∷ ∀ t f u g @@ -209,7 +209,7 @@ transApo → u transApo f = go where - go t = mapR (map (either id go) <<< f) t + go t = mapR (map (either identity go) <<< f) t transApoT ∷ ∀ t f @@ -220,7 +220,7 @@ transApoT → t transApoT f = go where - go t = either id (mapR (map go)) $ f t + go t = either identity (mapR (map go)) $ f t futu ∷ ∀ t f a. Corecursive t f ⇒ GCoalgebra (Free f) f a → a → t futu = gana distFutu diff --git a/test/Test/Example/Expr.purs b/test/Test/Example/Expr.purs index 8c69d73..d943e10 100644 --- a/test/Test/Example/Expr.purs +++ b/test/Test/Example/Expr.purs @@ -1,7 +1,7 @@ module Test.Example.Expr where -import Control.Monad.Eff (Eff) -import Control.Monad.Eff.Console (CONSOLE, log, logShow) +import Effect (Effect) +import Effect.Console (log, logShow) import Data.Functor.Mu (Mu) import Matryoshka (class Corecursive, class Recursive, Algebra, cata, embed) import Prelude hiding (mul) @@ -28,7 +28,7 @@ someExpr = mul (num 2) (mul (num 3) (num 4)) type Expr = Mu ExprF -exprExample :: forall t. Eff (console :: CONSOLE | t) Unit +exprExample :: Effect Unit exprExample = do log "expr example" logShow $ evalExpr (someExpr :: Expr) diff --git a/test/Test/Example/List.purs b/test/Test/Example/List.purs index 81ef8ee..033730c 100644 --- a/test/Test/Example/List.purs +++ b/test/Test/Example/List.purs @@ -2,8 +2,8 @@ module Test.Example.List where import Prelude -import Control.Monad.Eff (Eff) -import Control.Monad.Eff.Console (CONSOLE, log, logShow) +import Effect (Effect) +import Effect.Console (log, logShow) import Data.Functor.Mu (Mu) import Data.TacitString (TacitString) @@ -36,7 +36,7 @@ fac = hylo prod count type List a = Mu (ListF a) -listExample :: forall t. Eff (console :: CONSOLE | t) Unit +listExample :: Effect Unit listExample = do log "list example" let someList = cons 1 (cons 2 (cons 3 (cons 4 nil))) diff --git a/test/Test/Main.purs b/test/Test/Main.purs index f9e0ead..7ca4ce1 100644 --- a/test/Test/Main.purs +++ b/test/Test/Main.purs @@ -1,12 +1,11 @@ module Test.Main where import Prelude -import Control.Monad.Eff (Eff) -import Control.Monad.Eff.Console (CONSOLE) +import Effect (Effect) import Test.Example.Expr (exprExample) import Test.Example.List (listExample) -main :: forall t. Eff ( console :: CONSOLE | t) Unit +main :: Effect Unit main = do exprExample listExample