type aliases and Id
Stefan Holdermans
stefan at cs.uu.nl
Mon Mar 19 14:57:05 EDT 2007
Ian,
Mmm...
> * Allow "type Id =" (I prefer this to "type Id" as I think we are more
> likely to want to use the latter syntax for something else later
> on).
Looks kind of funny; I'm not too thrilled.
> * Implementations should eta-reduce all type synonyms as much as
> possible, e.g.
> type T a b c d = X a b Int c d
> is equivalent to
> type T a b = X a b Int
> and
> type Id a = a
> is equivalent to a type that cannot be expressed directly.
I like this alternatie a bit better, but I can also see how it
introduces a lot of potential confusing, especially for novice
Haskell programmers. You write something and the compiler goes along
with something else...
Maybe this will serve as a source of inspiration: http://
portal.acm.org/citation.cfm?doid=581478.581496 [1].
Cheers,
Stefan
[1] Matthias Neubauer and Peter Thiemann. Type classes with more
higher-order poly-
morphism. In Proceedings of the Seventh ACM SIGPLAN International
Conference on
Functional Programming (ICFP ’02), Pittsburgh, Pennsylvania, USA,
October 4–-6, 2002,
pages 179–-190. ACM Press, 2002.
More information about the Haskell-prime
mailing list