Personal tools

Talk:Comparing class alias proposals

From HaskellWiki

Revision as of 00:14, 30 April 2009 by Remi (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

About context synonyms:

A context synonym may appear anywhere a context is allowed:
Q: May a CS's RHS refer to other CS's? For example:
context Foo a = (BoundedEnum a, Eq a, Ord a)

I think you've already answered your own question. What to do about loops is something else of course.

Q: Apart from type constructors, may a CS's variables be class constructors (things of kind ... -> Context) as well? For example:
Q: May CS's be passed as arguments to other CS's? For example

I'd say this is an obvious no until we have some more general concept of class-variables. And let's not try to fit that in a context-synonym-proposal ;)

Q: May CS's be partially applied? Consider these alternate definitions of BoundedEnum:

Does this actually buy us anything? Unless we go for one of the extensions and we want something like this to be the only syntax perhaps?