[GHC] #12563: Bad error message around lack of impredicativity
GHC
ghc-devs at haskell.org
Fri May 18 15:27:17 UTC 2018
#12563: Bad error message around lack of impredicativity
-------------------------------------+-------------------------------------
Reporter: goldfire | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
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 RyanGlScott):
This appears to be fixed, as of GHC 8.2.2:
{{{
$ /opt/ghc/8.2.2/bin/ghci Bug.hs -XRankNTypes
GHCi, version 8.2.2: http://www.haskell.org/ghc/ :? for help
Loaded GHCi configuration from /home/rgscott/.ghci
[1 of 1] Compiling Main ( Bug.hs, interpreted )
Bug.hs:4:15: error:
• Cannot instantiate unification variable ‘p0’
with a type involving foralls: (forall a. f0 a) -> f0 r0
GHC doesn't yet support impredicative polymorphism
• In the first argument of ‘foo’, namely ‘g’
In the expression: foo g
In the expression: \ g -> foo g
• Relevant bindings include
g :: p0 (bound at Bug.hs:4:6)
x :: p0 -> f0 r0 (bound at Bug.hs:4:1)
|
4 | x = \g -> foo g
| ^
}}}
I'll add a regression test.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12563#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list