Changes between Version 1 and Version 2 of DerivedInstances
- Timestamp:
- 12/01/05 14:24:17 (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DerivedInstances
v1 v2 5 5 * Automatic derivation is only available for certain classes defined in the Prelude and standard libraries. 6 6 * There is no way to specify how to derive a user-defined class in the general case. 7 * There is no way to derive an instance of a class for a data type that is defined elsewhere (in another module). 8 * There is no easy way to refer to the definitions that would have been derived when defining an explicit instance. 9 * Deriving fails for some Haskell-98 data types. Try 10 {{{ 11 data Rose f a = Fork a (f (Rose f a)) deriving Show 12 }}} 13 as an example. 7 14 * Even in the absence of user-defined deriving, it should be easy for a 'newtype' decl to inherit some of the instances of its parent type, no matter where the class was defined, but this is currently only available as a ghc extension to haskell'98. 8 15
