@@ -14,7 +14,6 @@ module Control.Monad.Free.Trans
1414import Prelude
1515
1616import Control.Apply (lift2 )
17- import Control.Monad.Eff.Class (class MonadEff , liftEff )
1817import Control.Monad.Error.Class (class MonadThrow , throwError )
1918import Control.Monad.Reader.Class (class MonadAsk , ask )
2019import Control.Monad.Rec.Class (class MonadRec , Step (..), tailRecM )
@@ -24,7 +23,7 @@ import Control.Monad.Writer.Class (class MonadTell, tell)
2423import Data.Bifunctor (bimap )
2524import Data.Either (Either (..))
2625import Data.Exists (Exists , mkExists , runExists )
27- import Data.Monoid (class Monoid , mempty )
26+ import Effect.Class (class MonadEffect , liftEffect )
2827
2928-- | Instead of implementing `bind` directly, we capture the bind using this data structure, to
3029-- | evaluate later.
@@ -88,8 +87,8 @@ instance semigroupFreeT :: (Functor f, Monad m, Semigroup w) => Semigroup (FreeT
8887instance monoidFreeT :: (Functor f , Monad m , Monoid w ) => Monoid (FreeT f m w ) where
8988 mempty = pure mempty
9089
91- instance monadEffFreeT :: (Functor f , MonadEff eff m ) => MonadEff eff (FreeT f m ) where
92- liftEff = lift <<< liftEff
90+ instance monadEffectFreeT :: (Functor f , MonadEffect m ) => MonadEffect (FreeT f m ) where
91+ liftEffect = lift <<< liftEffect
9392
9493instance monadAskFreeT :: (Functor f , MonadAsk r m ) => MonadAsk r (FreeT f m ) where
9594 ask = lift ask
@@ -109,11 +108,11 @@ liftFreeT fa = FreeT \_ -> pure (Right (map pure fa))
109108
110109-- | Change the underlying `Monad` for a `FreeT` action.
111110hoistFreeT :: forall f m n a . Functor f => Functor n => (m ~> n ) -> FreeT f m a -> FreeT f n a
112- hoistFreeT = bimapFreeT id
111+ hoistFreeT = bimapFreeT identity
113112
114113-- | Change the base functor `f` for a `FreeT` action.
115114interpret :: forall f g m a . Functor f => Functor m => (f ~> g ) -> FreeT f m a -> FreeT g m a
116- interpret nf = bimapFreeT nf id
115+ interpret nf = bimapFreeT nf identity
117116
118117-- | Change the base functor `f` and the underlying `Monad` for a `FreeT` action.
119118bimapFreeT :: forall f g m n a . Functor f => Functor n => (f ~> g ) -> (m ~> n ) -> FreeT f m a -> FreeT g n a
0 commit comments