Skip to content

Instantly share code, notes, and snippets.

@vrom911
Created October 13, 2017 19:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vrom911/37ffe34fa13e7229a8c6e39f7ec74ea2 to your computer and use it in GitHub Desktop.
Save vrom911/37ffe34fa13e7229a8c6e39f7ec74ea2 to your computer and use it in GitHub Desktop.
ApplicativeDo bug in ghc-8.2.1
{-# LANGUAGE ApplicativeDo #-}
import Options.Applicative
main :: IO ()
main = undefined
data Example = Example
{ someBool :: Bool }
exampleP :: Parser Example
exampleP = do
(a, b) <- toPair <$> boolP
pure $ Example a
where
toPair :: Bool -> (Bool, Bool)
toPair x = (x,x)
boolP :: Parser Bool
boolP = undefined
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment