#2605: Possible error message improvement when -XRankNTypes is missing
-----------------------------+----------------------------------------------
Reporter: kaol | Owner:
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.8.2
Severity: trivial | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Architecture: Unknown
Os: Unknown |
-----------------------------+----------------------------------------------
Changes (by simonpj):
* difficulty: => Unknown
Comment:
The HEAD (and hence 6.10) are already better in this respect:
{{{
:t undefined :: ((forall a . a -> a) -> a -> a)
<interactive>:1:24:
Illegal operator `.' in type `forall a . (a -> a)'
Perhaps you intended to use -XRankNTypes or similar flag
to enable explicit-forall syntax: forall <tvs>. <type>
Prelude> :set -XExistentialQuantification
Prelude> :t undefined :: ((forall a . a -> a) -> a -> a)
<interactive>:1:0:
Illegal polymorphic or qualified type: forall a. a -> a
Perhaps you intended to use -XRankNTypes or -XRank2Types
In an expression type signature:
(forall a. a -> a) -> a -> a
In the expression: undefined :: (forall a. a -> a) -> a -> a
Prelude>
}}}
Is that better?
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2605#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs