-
-
Save kuribas/9bf506b79dd2690600c4c06108efae59 to your computer and use it in GitHub Desktop.
applicative bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE ApplicativeDo #-} | |
module ApplicativeDont (foo) where | |
data M a | |
data N a | |
instance Functor M | |
instance Applicative M | |
instance Functor N | |
instance Applicative N | |
instance Monad N | |
newtype Alias = Alias (forall a. a -> M a) | |
foo :: N (M ()) | |
foo = do | |
pure () | |
Alias mt <- undefined | |
pure () | |
pure $ (\c b -> ()) <$> mt 'a' <*> mt False | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment