[GHC] #11319: ImpredicativeTypes even more broken than usual (was: ImpredicativeTypes cause trouble (affects deriving of Traversable))
GHC
ghc-devs at haskell.org
Thu Dec 31 01:06:10 UTC 2015
#11319: ImpredicativeTypes even more broken than usual
-------------------------------------+-------------------------------------
Reporter: Iceland_jack | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler (Type | Version: 7.11
checker) | Keywords:
Resolution: | ImpredicativeTypes
Operating System: Linux | Architecture:
Type of failure: GHC rejects | Unknown/Multiple
valid program | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Changes (by rwbarton):
* cc: goldfire (added)
Comment:
Nothing special about deriving here, try:
{{{
{-# LANGUAGE ImpredicativeTypes #-}
f :: Applicative f => f (Maybe a)
f = pure Nothing
main = return ()
{-
Error.hs:4:5: error:
• Couldn't match type ‘forall a1. Maybe a1’ with ‘Maybe a’
Expected type: f (Maybe a)
Actual type: f (forall a. Maybe a)
• In the expression: pure Nothing
In an equation for ‘f’: f = pure Nothing
• Relevant bindings include
f :: f (Maybe a) (bound at Error.hs:4:1)
-}
}}}
This is with an up-to-the-minute version of HEAD, that contains the
relevant-looking Phab:1715.
As `ImpredicativeTypes` is unsupported anyways, perhaps we should just
take the opportunity to kill it?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11319#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list