Changes between Version 4 and Version 5 of StandardClasses
- Timestamp:
- 09/13/06 01:49:23 (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
StandardClasses
v4 v5 5 5 Many of the proposals involve additional superclasses, which would be less burdensome with [ticket:101 class aliases] or something similar, but such features are not yet implemented. 6 6 7 == The Read class == 8 See ReadClass. 7 == Constructor classes == 9 8 10 == The Enum class == 11 Issues: 12 * `succ` and `pred` are unused. 13 * The default definitions of `enum`* would make more sense if `toEnum` and `fromEnum` used `Integer` instead of `Int`. 14 15 == The Functor class == 9 === The Functor class === 16 10 Proposal: 17 11 * Add instances for `((->) a)`, `((,) a)` and `Either a`. … … 46 40 47 41 Proposals: 48 * a group-like class with `zero`, `(+)` and `negate`/`(-)`. 42 * a group-like class with `zero`, `(+)` and `negate`/`(-)` 43 (could be further split with a monoid sub-class) 49 44 * a ring-like subclass adding `(*)` and `one`/`fromInteger`, with the existing `Num` class as a further subclass. 50 45 Note that the `Float` and `Double` instances will not satisfy the usual axioms for these structures. … … 52 47 === The Integral class === 53 48 Issues: 54 * `div` and `mod` also sense for rationals and polynomials, but `Ord`, `Num` and `toInteger` (and `toRational` for polynomials) don't. 55 However `quot` and `rem` assume an ordering. 49 * `div` and `mod` also sense for rationals and polynomials, but `toInteger` does not. 50 `Ord`, `Num(abs, signum)`, `toInteger` and `toRational` don't make sense for polynomials. 51 `quot` and `rem` assume an ordering. 56 52 57 53 === The Fractional class === … … 67 63 This is independent of all the other proposals. 68 64 69 == The Ix class == 65 == Other standard classes == 66 67 === The Read class === 68 See ReadClass. 69 70 === The Enum class === 71 Issues: 72 * `succ` and `pred` are unused. 73 * The default definitions of `enum`* would make more sense if `toEnum` and `fromEnum` used `Integer` instead of `Int`. 74 75 === The Ix class === 70 76 Issues: 71 77 * There is no portable way to report indexing errors accurately.
