[GHC] #10644: Option GADTs invalidates a rank-2 function.
GHC
ghc-devs at haskell.org
Wed Jul 15 20:30:20 UTC 2015
#10644: Option GADTs invalidates a rank-2 function.
-------------------------------------+-------------------------------------
Reporter: bales | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.1
Keywords: | Operating System: Linux
Architecture: x86_64 | Type of failure: GHC rejects
(amd64) | valid program
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Revisions: |
-------------------------------------+-------------------------------------
This module typechecks WITHOUT the extension GADTs
and doesn't typecheck WITH the extension GADTs
Since it has nothing to do with GADTs, the consequence of using
the option is surprising.
I witnessed this behaviour on GHC versions 7.6.3, 7.8.3, 7.8.4, 7.10.1
{{{#!hs
{-# LANGUAGE
RankNTypes
, GADTs
#-}
module GADTMonomorphism where
problem :: (forall x . () -> x) -> (a,b)
problem f = (p, p)
where p = f ()
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10644>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list