Skip to content

Commit 3bf25fa

Browse files
Move existing implementation to Compat modules
1 parent 1e9eff6 commit 3bf25fa

File tree

5 files changed

+10
-13
lines changed

5 files changed

+10
-13
lines changed

src/Control/Comonad/Cofree/Class.purs renamed to src/Control/Comonad/Cofree/Class/Compat.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
module Control.Comonad.Cofree.Class
1+
module Control.Comonad.Cofree.Class.Compat
22
( class ComonadCofree
33
, unwrapCofree
44
) where
55

66
import Prelude
77

88
import Control.Comonad (class Comonad)
9-
import Control.Comonad.Cofree (Cofree, tail)
9+
import Control.Comonad.Cofree.Compat (Cofree, tail)
1010
import Control.Comonad.Env.Trans (EnvT(..))
1111
import Control.Comonad.Store.Trans (StoreT(..))
1212
import Control.Comonad.Traced.Trans (TracedT(..))

src/Control/Comonad/Cofree.purs renamed to src/Control/Comonad/Cofree/Compat.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
-- | The _cofree comonad_ for a `Functor`.
22

3-
module Control.Comonad.Cofree
3+
module Control.Comonad.Cofree.Compat
44
( Cofree
55
, deferCofree
66
, mkCofree, (:<)
@@ -18,7 +18,7 @@ import Control.Alternative (class Alternative, (<|>), empty)
1818
import Control.Comonad (class Comonad, extract)
1919
import Control.Extend (class Extend)
2020
import Control.Lazy as Z
21-
import Control.Monad.Free (Free, runFreeM)
21+
import Control.Monad.Free.Compat (Free, runFreeM)
2222
import Control.Monad.Rec.Class (class MonadRec)
2323
import Control.Monad.State (State, StateT(..), runState, runStateT, state)
2424
import Data.Eq (class Eq1, eq1)

src/Control/Monad/Free/Class.purs renamed to src/Control/Monad/Free/Class/Compat.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
module Control.Monad.Free.Class
1+
module Control.Monad.Free.Class.Compat
22
( class MonadFree
33
, wrapFree
44
) where
55

66
import Prelude
77

88
import Control.Monad.Except.Trans (ExceptT(..), runExceptT)
9-
import Control.Monad.Free (Free, liftF)
9+
import Control.Monad.Free.Compat (Free, liftF)
1010
import Control.Monad.Maybe.Trans (MaybeT(..), runMaybeT)
1111
import Control.Monad.Reader.Trans (ReaderT(..), runReaderT)
1212
import Control.Monad.State.Trans (StateT(..), runStateT)

src/Control/Monad/Free.purs renamed to src/Control/Monad/Free/Compat.purs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module Control.Monad.Free
1+
module Control.Monad.Free.Compat
22
( Free
33
, suspendF
44
, wrap
@@ -17,7 +17,6 @@ import Prelude
1717
import Control.Apply (lift2)
1818
import Control.Monad.Rec.Class (class MonadRec, Step(..), tailRecM)
1919
import Control.Monad.Trans.Class (class MonadTrans)
20-
2120
import Data.CatList (CatList, empty, snoc, uncons)
2221
import Data.Either (Either(..))
2322
import Data.Eq (class Eq1, eq1)
@@ -26,7 +25,6 @@ import Data.Maybe (Maybe(..))
2625
import Data.Ord (class Ord1, compare1)
2726
import Data.Traversable (class Traversable, traverse)
2827
import Data.Tuple (Tuple(..))
29-
3028
import Unsafe.Coerce (unsafeCoerce)
3129

3230
-- | The free monad for a type constructor `f`.
@@ -117,7 +115,7 @@ instance semigroupFree :: Semigroup a => Semigroup (Free f a) where
117115

118116
instance monoidFree :: Monoid a => Monoid (Free f a) where
119117
mempty = pure mempty
120-
118+
121119
-- | Lift an impure value described by the generating type constructor `f` into
122120
-- | the free monad.
123121
liftF :: forall f. f ~> Free f

src/Control/Monad/Trampoline.purs renamed to src/Control/Monad/Trampoline/Compat.purs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
-- | a monad transformer stack to avoid stack overflows in large
33
-- | monadic computations.
44

5-
module Control.Monad.Trampoline
5+
module Control.Monad.Trampoline.Compat
66
( Trampoline
77
, done
88
, delay
@@ -11,8 +11,7 @@ module Control.Monad.Trampoline
1111

1212
import Prelude
1313

14-
import Control.Monad.Free (Free, liftF, runFree)
15-
14+
import Control.Monad.Free.Compat (Free, liftF, runFree)
1615

1716
-- | The `Trampoline` monad
1817
-- |

0 commit comments

Comments
 (0)