Mercury Bugs - mercury | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0000140 | mercury | Bug | public | 2010-03-31 12:27 | 2010-04-01 18:36 |
Reporter | mgiuca | ||||
---|---|---|---|---|---|
Assigned To | |||||
Priority | normal | Severity | text | Reproducibility | N/A |
Status | acknowledged | Resolution | open | ||
Platform | OS | OS Version | |||
Product Version | |||||
Target Version | Fixed in Version | ||||
Summary | 0000140: Manual section 10 doesn't mention existential types | ||||
Description | Section 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. | ||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files |
There are no notes attached to this issue. |
Issue History | |||||
Date Modified | Username | Field | Change | ||
---|---|---|---|---|---|
2010-03-31 12:27 | mgiuca | New Issue | |||
2010-04-01 18:36 | juliensf | Status | new => acknowledged |