From: Hannu Niemistö Date: Mon, 9 Oct 2017 15:31:53 +0000 (+0300) Subject: (refs #7532) Changed the context of FunctorM from Functor to FunctorE X-Git-Tag: v1.31.0~137 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=5624bd4adbed726047cc677eee7d86420f7097f3;p=simantics%2Fplatform.git (refs #7532) Changed the context of FunctorM from Functor to FunctorE Change-Id: I3d4e4d430a79f118d5b69426d02a24ccbbf345ce --- diff --git a/bundles/org.simantics.scl.runtime/scl/Prelude.scl b/bundles/org.simantics.scl.runtime/scl/Prelude.scl index 8fcd3ced1..5e5bd858b 100644 --- a/bundles/org.simantics.scl.runtime/scl/Prelude.scl +++ b/bundles/org.simantics.scl.runtime/scl/Prelude.scl @@ -1081,12 +1081,12 @@ replicate n v = build (\empty cons -> /// FunctorM /// -class (Functor f) => FunctorM f where +class (FunctorE f) => FunctorM f where "`mapM f` is equivalent to `sequence . map f`." - mapM :: Monad m => (a -> m b) -> f a -> m (f b) + mapM :: Monad m => (a -> m b) -> f a -> m (f b) "Evaluate each action in the sequence from left to right, and collect the results." sequence :: Monad m => f (m a) -> m (f a) - mapM f l = sequence (fmap f l) + mapM f l = sequence (map f l) /// MonadE ///