[GHC] #11835: ApplicativeDo failed to desugar last line with pure $ <expr>
GHC
ghc-devs at haskell.org
Thu Apr 14 06:17:22 UTC 2016
#11835: ApplicativeDo failed to desugar last line with pure $ <expr>
-------------------------------------+-------------------------------------
Reporter: Cosmia | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1-rc2
Keywords: ApplicativeDo | Operating System: MacOS X
Architecture: | Type of failure: GHC rejects
Unknown/Multiple | valid program
Test Case: | Blocked By:
Blocking: | Related Tickets: #11607
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
{{{#!hs
{-# LANGUAGE ApplicativeDo #-}
f m = do
x <- m 1
y <- m 2
return $ x + y
}}}
f should have type (Applicative f, Num a, Num b) => (a -> f b) -> f b
but ghc considers f a monad
maybe similar with #11607
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11835>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list