Created
October 13, 2017 19:38
-
-
Save vrom911/37ffe34fa13e7229a8c6e39f7ec74ea2 to your computer and use it in GitHub Desktop.
ApplicativeDo bug in ghc-8.2.1
This file contains hidden or 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 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