File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -10,8 +10,7 @@ module Control.Comonad.Cofree
10
10
import Prelude
11
11
12
12
import Control.Comonad (class Comonad )
13
- import Control.Alt ((<|>))
14
- import Control.MonadPlus (class MonadPlus )
13
+ import Control.Alternative (class Alternative , (<|>))
15
14
import Control.Extend (class Extend )
16
15
import Control.Monad.Trampoline (Trampoline , runTrampoline )
17
16
@@ -85,9 +84,9 @@ instance applyCofree :: (Apply f) => Apply (Cofree f) where
85
84
instance applicativeCofree :: (Applicative f ) => Applicative (Cofree f ) where
86
85
pure a = mkCofree a (pure $ pure a)
87
86
88
- instance bindCofree :: (MonadPlus f ) => Bind (Cofree f ) where
87
+ instance bindCofree :: (Alternative f ) => Bind (Cofree f ) where
89
88
bind fa f = loop fa where
90
89
loop fa = let fh = f (head fa)
91
90
in mkCofree (head fh) ((tail fh) <|> (loop <$> tail fa))
92
91
93
- instance monadCofree :: (MonadPlus f ) => Monad (Cofree f )
92
+ instance monadCofree :: (Alternative f ) => Monad (Cofree f )
You can’t perform that action at this time.
0 commit comments