File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ module Control.Comonad.Cofree
10
10
import Prelude
11
11
12
12
import Control.Comonad (class Comonad )
13
- import Control.Alternative (class Alternative , (<|>))
13
+ import Control.Alternative (class Alternative , (<|>), empty )
14
14
import Control.Extend (class Extend )
15
15
import Control.Monad.Trampoline (Trampoline , runTrampoline )
16
16
@@ -81,8 +81,8 @@ instance applyCofree :: (Apply f) => Apply (Cofree f) where
81
81
h = (head f) (head x)
82
82
t = (<*>) <$> (tail f) <*> (tail x)
83
83
84
- instance applicativeCofree :: (Applicative f ) => Applicative (Cofree f ) where
85
- pure a = mkCofree a (pure $ pure a)
84
+ instance applicativeCofree :: (Alternative f ) => Applicative (Cofree f ) where
85
+ pure a = mkCofree a empty
86
86
87
87
instance bindCofree :: (Alternative f ) => Bind (Cofree f ) where
88
88
bind fa f = loop fa where
You can’t perform that action at this time.
0 commit comments