Skip to content

Commit 377f33d

Browse files
committed
added missing MonadTrans instance for ListT
1 parent dde33a8 commit 377f33d

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525

2626
instance monadListT :: (Monad f) => Monad (ListT f)
2727

28+
instance monadTransListT :: MonadTrans ListT
29+
2830
instance monoidListT :: (Applicative f) => Monoid (ListT f a)
2931

3032
instance semigroupListT :: (Applicative f) => Semigroup (ListT f a)

src/Control/Monad/ListT.purs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ module Control.Monad.ListT
9595

9696
instance monadListT :: (Monad f) => Monad (ListT f)
9797

98+
instance monadTransListT :: MonadTrans ListT where
99+
lift = fromEffect
100+
98101
singleton :: forall f a. (Applicative f) => a -> ListT f a
99102
singleton a = prepend a nil
100103

0 commit comments

Comments
 (0)