GHC 6.6 GADT type unification vs GHC 6.8

Jason Dagit dagit at codersbase.com
Tue Jul 29 10:14:09 EDT 2008


On Tue, Jul 29, 2008 at 1:07 AM, Simon Peyton-Jones
<simonpj at microsoft.com>wrote:

>  GHC 6.6 was a bit more generous than GHC 6.8, but erroneously so.
>   Specifically, GHC 6.8 and all subsequent versions require that when you
> pattern match on a value of GADT type,
>
> ·         the type of the scrutinee
>
> ·         the type of the result of the case
>
> ·         the types of any free variables used inside the case
> alternatives
>
> are all completely known ("rigid" in GHC's terminology) at the case
> expression.
>
Thanks, this makes sense and helps.   Is this described in the wobbly types
paper, or is paper covering a different topics?  I would like to have a
cite-able reference.


>
> The easiest way to make a variable have a rigid type is to give it a type
> signature.
>
>
>
> I don't expect to revert to GHC 6.6's behaviour because I don't know how to
> do (robust, complete) type inference for that.
>

In that case, good thing I finally figured out what changes to make to darcs
so that our type witness code compiles in both 6.6 and 6.8.  My changes
match what you describe.


>
>
> I'll add these remarks to the user manual.
>
Great!

Thanks,
Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20080729/61a1d295/attachment.htm


More information about the Glasgow-haskell-users mailing list