|
GHC.Num | Portability | non-portable (GHC Extensions) | Stability | internal | Maintainer | cvs-ghc@haskell.org |
|
|
|
Description |
The Num class and the Integer type.
|
|
Synopsis |
|
|
|
Documentation |
|
|
Basic numeric class.
Minimal complete definition: all except negate or (-)
| | Methods | | | | | | | | Unary negation.
| | | Absolute value.
| | | Sign of a number.
The functions abs and signum should satisfy the law:
abs x * signum x == x
For real numbers, the signum is either -1 (negative), 0 (zero)
or 1 (positive).
| | | Conversion from an Integer.
An integer literal represents the application of the function
fromInteger to the appropriate value of type Integer,
so such literals have type (Num a) => a.
|
| | Instances | |
|
|
|
the same as flip (-).
Because - is treated specially in the Haskell grammar,
(- e) is not a section, but an application of prefix negation.
However, (subtract exp) is equivalent to the disallowed section.
|
|
|
|
|
|
|
Arbitrary-precision integers.
| Constructors | S# Int# | | J# Int# ByteArray# | |
| Instances | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Produced by Haddock version 2.0.0.0 |