Go to the first, previous, next, last section, table of contents.
- `fromInt' method in class `Num':
- It's there. Converts from an `Int' to the type.
- `toInt' method in class `Integral':
- Converts from type type to an `Int'.
- Overlapping instance declarations:
- In `instance <context> => Class (T x1 ... xn)', the `xi's can be
types, rather than just type variables.
Thus, you can have an instance `instance Foo [Char]', as well as
the more general `instance Foo [a]'; the former will be used in
preference to the latter, where applicable.
As Lennart says, "This is a dubious feature and should not be used
carelessly."
See also: `SPECIALIZE instance' pragmas, in Section See section Faster: producing a program that runs quicker.
Go to the first, previous, next, last section, table of contents.