Dear GHC hackers

I've just pushed a Big Patch which adds impredicative types to GHC.  The
commit message is below.

Note the warnings -- but I hope you'll update and test. That way I can
shake the bugs out.

Simon

====


  * Simon's big boxy-type commit
  
  This very large commit adds impredicativity to GHC, plus
  numerous other small things.
    
  *** WARNING: I have compiled all the libraries, and
  ***        a stage-2 compiler, and everything seems
  ***        fine.  But don't grab this patch if you 
  ***        can't tolerate a hiccup if something is
  ***        broken.
    
  The big picture is this:
  
  a) GHC handles impredicative polymorphism, as described in the
     "Boxy types: type inference for higher-rank types and
     impredicativity" paper
  
  b) GHC handles GADTs in the new simplified (and very sligtly less
     epxrssive) way described in the
     "Simple unification-based type inference for GADTs" paper
  
    
  But there are lots of smaller changes, and since it was pre-Darcs
  they are not individually recorded.
    
  Some things to watch out for:
    
  c)   The story on lexically-scoped type variables has changed, as per
       my email.  I append the story below for completeness, but I 
       am still not happy with it, and it may change again.  In
particular,
       the new story does not allow a pattern-bound scoped type variable
       to be wobbly, so (\(x::[a]) -> ...) is usually rejected.  This is
       more restrictive than before, and we might loosen up again.
    
  d)   A consequence of adding impredicativity is that GHC is a bit less
       gung ho about converting automatically between
        (ty1 -> forall a. ty2)    and    (forall a. ty1 -> ty2)
       In particular, you may need to eta-expand some functions to make
       typechecking work again.
     
       Furthermore, functions are now invariant in their argument types,
       rather than being contravariant.  Again, the main consequence is
       that you may occasionally need to eta-expand function arguments
when
       using higher-rank polymorphism.
    
  
  Please test, and let me know of any hiccups
_______________________________________________
Cvs-ghc mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to