Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Documentation
Basic numeric class.
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).
fromInteger :: Integer -> a #
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
Read
:: Num a | |
=> a | the base |
-> (Char -> Bool) | a predicate distinguishing valid digits in this base |
-> (Char -> Int) | a function converting a valid digit character to an |
-> ReadS a |
Reads an unsigned Integral
value in an arbitrary base.
readDec :: (Eq a, Num a) => ReadS a #
Read an unsigned number in decimal notation.
>>>
readDec "0644"
[(644,"")]