Skip to content

Commit

Permalink
Update Lance.hs
Browse files Browse the repository at this point in the history
  • Loading branch information
echatav committed Oct 14, 2020
1 parent 2e591bc commit 621e7ec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Control/Monad/Trans/Indexed/Free/Lance.hs
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ instance (i ~ j, Monad m) => Monad (FreeIx f i j m) where
instance i ~ j => MonadTrans (FreeIx f i j) where
lift = FreeIx . Wrap.FreeIx . fmap Wrap.Unwrap
instance IndexedMonadTrans (FreeIx f) where
ixBind g (FreeIx (Wrap.FreeIx m)) = do
ixJoin (FreeIx (Wrap.FreeIx m)) =
FreeIx . Wrap.FreeIx $ m >>= \case
Wrap.Unwrap x -> Wrap.runFreeIx (runFreeIx (g x))
Wrap.Wrap (Lance f y) -> return $
Wrap.Wrap (Lance (ixAndThen (runFreeIx . g) f) y)
Wrap.Unwrap y -> Wrap.runFreeIx (runFreeIx y)
Wrap.Wrap (Lance f x) -> return $
Wrap.Wrap (Lance (ixAndThen runFreeIx f) x)
instance
( Monad m
, i ~ j
Expand Down

0 comments on commit 621e7ec

Please sign in to comment.