2024-11-21 23:51 AEDT

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000140mercuryBugpublic2010-04-01 18:36
Reportermgiuca 
Assigned To 
PrioritynormalSeveritytextReproducibilityN/A
StatusacknowledgedResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0000140: Manual section 10 doesn't mention existential types
DescriptionSection 11 (existential types) mentions type class constraints on a) existential type variables in predicates and functions, and b) existential type variables in data type definitions.

However, section 10, which specifically details type class constraints, does not mention these at all. I found this particularly confusing when trying to find out how to put a type class constraint on a data type definition.

Since this is a reference manual, and not intended to be read cover-to-cover, it doesn't need to hide details just because they haven't been mentioned yet. I would recommend at least adding forward references:

- adding to section 10.5 a paragraph which states "Type constraints can also be applied to existential type variables, with the syntax "=> Typeclass(Type, ...), ...". See section 11.2."
- adding to section 10 a new section (between 10.7 and 10.8) called "Type class constraints on data type definitions", which simply has the text "Type constraints may also be applied to data type definitions, which may have existentially quantified type variables. See section 11.3."

For a more substantial rework, I would recommend swapping sections 10 and 11, and moving the type class discussion from the "Existential types" section to the "Type classes" section. This is because you can cover existential types without mentioning type classes, but you can't really cover type classes without mentioning existential types.
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes
There are no notes attached to this issue.
+Notes

-Issue History
Date Modified Username Field Change
2010-03-31 12:27 mgiuca New Issue
2010-04-01 18:36 juliensf Status new => acknowledged
+Issue History