Skip to content

Commit

Permalink
Fix Applicative (OutputBox input) instance (#565)
Browse files Browse the repository at this point in the history
  • Loading branch information
MitinPavel committed Jun 17, 2021
1 parent 0dbcb68 commit 17f8592
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ class (Apply f) <= Applicative f where

instance (Apply (OutputBox input)) <= Applicative (OutputBox input) where
pure :: forall a. a -> (OutputBox input) a
pure value = OutputBox (\input -> pure a {- Box's `pure` -})
pure value = OutputBox (\_ -> pure value {- Box's `pure` -})
```

## Bind
Expand Down Expand Up @@ -342,7 +342,7 @@ instance (Functor (OutputBox input)) <= Apply (OutputBox input) where

instance (Apply (OutputBox input)) <= Applicative (OutputBox input) where
pure :: forall a. a -> (OutputBox input) a
pure value = OutputBox (\input -> pure a)
pure value = OutputBox (\_ -> pure value)

instance (Apply (OutputBox input)) <= Bind (OutputBox input) where
bind :: forall originalOutput newOutput.
Expand Down

0 comments on commit 17f8592

Please sign in to comment.