/bug.hs Secret
Created
September 5, 2021 14:16
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