Simon Peyton-Jones:
Nothing deep. Just that "=" means so many things that it seemed
better to use a different notation.
Also, using "=" would have entailed significant changes to GHC's
parser. Type constraints are in the same syntactic category as types
and types can appear as part of expressions in type annotations (such
as "e::t") and on the lhs of let-bindings (such as "let x::t = e in
e'"). Especially, considering the later, imagine "t" can now also
contain the symbol "=" which in the grammar serves as a separator
between the lhs and the rhs of a let bindings.
I actually did try using "=", but it got too messy.
Manuel
| -----Original Message-----
| From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
] On Behalf Of
| Isaac Dupree
| Sent: 04 December 2007 15:59
| To: Jan-Willem Maessen
| Cc: Glasgow-haskell-users@haskell.org; Simon Peyton-Jones
| Subject: type equality symbol
|
| >> conv :: (a~b) => a -> b
| >> conv = id
|
| is there any particular reason that '~' is the symbol for type
equality
| constraints? I would think '=' would be the obvious choice,
(although
| perhaps it is already over-used, and is normally asymmetric in
Haskell!)?
|
| Isaac
| _______________________________________________
| Glasgow-haskell-users mailing list
| Glasgow-haskell-users@haskell.org
| http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users