release notes

Bulat Ziganshin bulat.ziganshin at gmail.com
Thu Sep 28 08:48:34 EDT 2006


Hello Simon,

i write to you, Simon (not to Igloo), because these changes require a
knowledge of new GHC language features that you have implemented

second paragraph of release notes
(http://www.haskell.org/ghc/dist/current/docs/users_guide/release-6-6.html)
is still erroneous. it mention two _different_ things - addition of
impredicative polymorphism and changes in scoped type variables.
Your mail mentioned here is about variables while section 7.4.9 is about
polymorphism. There is also section 7.4.10 what say about variables
and in my POV is much more readable than your letter. so i propose
to write smth like the:

- GHC now handles impredicative polymorphism, see Section 7.4.9,
⌠Impredicative polymorphism■ for the documentation

- There are changes to the way scoped type variables work, see Section
7.4.10 for details. Shortly saying, the following is no more works:

f (x::a) = sizeOf (undefined::a)
g :: a   = genericLength [] `asTypeOf` (undefined::a)


while Section 7.4.10 should mention "Simon's letter" as containing
more technical details. i also propose to add here explanations of
how old code can be converted to new syntax. it may be obvious for you
but not for us, common haskellers :D

f (x::a) = sizeOf (undefined::a)
should be now written as
f :: a -> Int
f (x::a) = sizeOf (undefined::a)

to reach compatibility with old GHC versions and Hugs. well, i'm not
language lawyer and not sure what is the best way, but at least
using 'forall' to bring 'a' into scope is not H98-compatible

It's very important to mention that this change means _dropping_
capabilities, not adding new ones, because it is completely unobvious
from current docs. i don't realized it until i've compiled my program
and spend several hours trying to understand 7.4.10, your letter and
then 7.4.10 again :)  i hope that proposed changes will greatly
simplify this "learning curve" :)

-- 
Best regards,
 Bulat                          mailto:Bulat.Ziganshin at gmail.com



More information about the Glasgow-haskell-users mailing list