forall in pattern type sig has changed from 6.2.2
------ The program (straight from documentation :-) ------
$ cat Test.hs
test = \(f :: forall a. a -> a) -> (f True,f 'a')
------ Works fine under 6.2.2 ------
tests $ ghci-6.2.2 -fglasgow-exts Test.hs
...
Compiling Test ( Test.hs, interpreted )
Ok, modules loaded: Test.
------ Doesn't typecheck under 6.4 ------
$ ghci-6.4 -fglasgow-exts Test.hs
...
Compiling Test ( Test.hs, interpreted )
Test.hs:3:9:
Inferred type is less polymorphic than expected
Quantified type variable `a' is mentioned in the environment:
test :: (a -> a) -> t (bound at Test.hs:3:0)
Expected type: forall a1. a1 -> a1
Inferred type: a -> a
In a lambda abstraction: \ (f :: forall a. a -> a) -> (f True, f 'a')
In the definition of `test': test = \ (f :: forall a. a -> a) -> (f True, f
'a')
...
Trac metadata
Trac field |
Value |
Version |
6.4 |
Type |
Bug |
TypeOfFailure |
OtherFailure |
Priority |
normal |
Resolution |
ResolvedFixed |
Component |
Compiler (Type checker) |
Test case |
|
Differential revisions |
|
BlockedBy |
|
Related |
|
Blocking |
|
CC |
|
Operating system |
|
Architecture |
|