Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Haskell
Wiki community
Recent changes
Random page
HaskellWiki
Search
Search
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Comparing class alias proposals
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Higher-order context synonyms == Possible additions to the context synonyms include: '''Q''': May a CS's RHS refer to other CS's? For example: context Foo a = (BoundedEnum a, Eq a, Ord a) This introduces the possibility of loops. Should loops be forbidden? It could be argued that in some cases of loops, the CS's transitive closure should be used, but this is only acceptable if the closure is finite. It seems more elegant to just forbid all loops. '''Q''': Apart from type constructors, may a CS's variables be class constructors (things of kind ... -> Context) as well? For example: context Bar a = a Int Here Bar :: (* -> Context) -> Context '''Q''': May CS's be passed as arguments to other CS's? For example: context Biz = Bar BoundedEnum '''Q''': May CS's be partially applied? Consider these alternate definitions of BoundedEnum: context BoundedEnum a = (Bounded, Enum) a context BoundedEnum = (Bounded, Enum) Currently the <code>,</code> separator can be seen as having kind <code>Context -> Context -> Context</code>, but the example above would make this more generic: <code>k -> k -> k</code>. '''Motivation''': these ideas are direct extensions of context synonyms and are useful for clients.
Summary:
Please note that all contributions to HaskellWiki are considered to be released under simple permissive license (see
HaskellWiki:Copyrights
for details). If you don't want your writing to be edited mercilessly and redistributed at will, then don't submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
DO NOT SUBMIT COPYRIGHTED WORK WITHOUT PERMISSION!
Cancel
Editing help
(opens in new window)
Toggle limited content width