Typeclass Notes
Typeclasses you may encounter in everyday programming.
- Num: Addition, multiplication, a way to convert from an integer. Also absolute value and negation.
- Real: Part of the real number line. Ordered numbers.
toRational
. Does not imply decimals! - Enum: Next and previous (
succ
-essor andpred
-ecessor). - Integral: Integer division.
- Fractional: “Decimal” division.
- Floating: transcendental functions (exponentials, trig, pi, e).
- RealFrac: truncate and round.
- RealFloat: efficient floating point.