[GHC] #11397: Type mismatch in local definitions in Haskell 98 code
GHC
ghc-devs at haskell.org
Mon Jan 11 21:52:11 UTC 2016
#11397: Type mismatch in local definitions in Haskell 98 code
-------------------------------------+-------------------------------------
Reporter: Lemming | Owner:
Type: bug | Status: new
Priority: highest | Milestone: 8.0.1
Component: Compiler (Type | Version: 8.0.1-rc1
checker) |
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by monoidal):
Smaller example:
{{{
module PairMismatch (f) where
f :: a -> [Maybe a]
f x =
let switch l = [l Nothing, l (Just x)]
in switch id
}}}
While investigating this, I found two more programs that compile with GHC
7.10 but fail with HEAD, I'm not sure if the cause is the same or
different.
{{{
module PairMismatch2 (f) where
u :: a
u = u
f :: a
f = let switch l = l u in switch u
}}}
{{{
module PairMismatch3 (f) where
f :: a
f = let switch l = l undefined in switch undefined
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11397#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list