Opened 12 years ago

Closed 12 years ago

Last modified 48 years ago

#392 closed bug (Fixed)

forall in pattern type sig has changed from 6.2.2

Reported by: mtullsen Owned by: nobody
Priority: normal Milestone:
Component: Compiler (Type checker) Version: 6.4
Keywords: Cc:
Operating System: Architecture:
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


------ 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 )

    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 

Change History (1)

comment:1 Changed 12 years ago by simonpj

Status: assignedclosed
Logged In: YES 

Ah yes.  Thank you.  In a cleanup of TcBInds I failed to take 
account of this case; the old code did it fine.

Fixed now. tc194 is the test case
Note: See TracTickets for help on using tickets.