[Haskell-cafe] :i and :t give different types

Jonathan Cast jonathanccast at fastmail.fm
Thu Feb 7 21:44:20 EST 2008


On 7 Feb 2008, at 12:30 PM, Chad Scherrer wrote:

> On Feb 7, 2008 11:57 AM, Don Stewart <dons at galois.com> wrote:
>> Ah, yes, missing parens! Well spotted.
>>
>> So a pretty printer wibble in GHC?
>>
>> -- Don
>
> Yeah, that was my first concern, but then I noticed the quantification
> was different, so I'm still working through that one.

The quantification isn't different, just differently presented.  In  
Haskell 98, there are never explicit foralls and any type is  
implicitly quantified over its free variables at the top level.  So,  
in GHC a type without explicit foralls is quantified over its free  
variables at the top level.  So the two types are in fact equal.

> It was confusing, since I assumed the implementations of :i and :t
> shared a lot of code.

Apparently not :)

jcc



More information about the Haskell-Cafe mailing list