Skip to content

Commit

Permalink
Add dummy Applicative instances
Browse files Browse the repository at this point in the history
  • Loading branch information
rcook committed Dec 25, 2015
1 parent 497d02d commit a6d783e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ instance Functor f => Functor (Loop v f) where
fmap f (Loop k) =
Loop (fmap f . k)

instance Applicative f => Applicative (Loop v f) where
pure = undefined
(<*>) = undefined

instance Monad f => Monad (Loop v f) where
return =
Loop . return . return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ instance Functor f => Functor (Loop v s f) where
fmap f (Loop k) =
Loop (\env -> fmap (\(a, t) -> (f a, t)) . k env)

instance Applicative f => Applicative (Loop v s f) where
pure = undefined
(<*>) = undefined

instance Monad f => Monad (Loop v s f) where
return a =
Loop $ \_ s -> return (a, s)
Expand Down

0 comments on commit a6d783e

Please sign in to comment.