Skip to content

Commit

Permalink
Fix for Applicative Maybe (<*>) type signature (kowainik#446)
Browse files Browse the repository at this point in the history
I believe that since Just is not a type constructor and is just a data constructor, it cannot be used in the type signature
  • Loading branch information
alexkassil authored Oct 12, 2021
1 parent e128e04 commit f5bc09e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Chapter4.hs
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ instance Applicative Maybe where
pure :: a -> Maybe a
pure = Just
(<*>) :: Just (a -> b) -> Just a -> Just b
(<*>) :: Maybe (a -> b) -> Maybe a -> Maybe b
Nothing <*> _ = Nothing
Just f <*> x = fmap f x
@
Expand Down

0 comments on commit f5bc09e

Please sign in to comment.