Haskell Core Libraries (base package)ParentContentsIndex
GHC.Num
Portability non-portable (GHC Extensions)
Stability internal
Maintainer cvs-ghc@haskell.org
Description
The Num class and the Integer type.
Synopsis
class (Eq a, Show a) => Num a where
(+) :: a -> a -> a
(-) :: a -> a -> a
(*) :: a -> a -> a
negate :: a -> a
abs :: a -> a
signum :: a -> a
fromInteger :: Integer -> a
subtract :: (Num a) => a -> a -> a
quotRemInt :: Int -> Int -> (Int, Int)
divModInt :: Int -> Int -> (Int, Int)
data Integer
= S# Int#
| J# Int# ByteArray#
zeroInteger :: Integer
int2Integer :: Int -> Integer
integer2Int :: Integer -> Int
quotRemInteger :: Integer -> Integer -> (Integer, Integer)
remInteger :: Integer -> Integer -> Integer
quotInteger :: Integer -> Integer -> Integer
gcdInteger :: Integer -> Integer -> Integer
lcmInteger :: Integer -> Integer -> Integer
divExact :: Integer -> Integer -> Integer
enumDeltaIntegerFB :: (Integer -> b -> b) -> Integer -> Integer -> b
enumDeltaInteger :: Integer -> Integer -> [Integer]
jtos :: Integer -> String -> String
Documentation
class (Eq a, Show a) => Num a where
Methods
(+) :: a -> a -> a
(-) :: a -> a -> a
(*) :: a -> a -> a
negate :: a -> a
abs :: a -> a
signum :: a -> a
fromInteger :: Integer -> a
Instances
(RealFloat a) => Num (Complex a)
Num CChar
Num CSChar
Num CUChar
Num CShort
Num CUShort
Num CInt
Num CUInt
Num CLong
Num CULong
Num CLLong
Num CULLong
Num CFloat
Num CDouble
Num CLDouble
Num CPtrdiff
Num CSize
Num CWchar
Num CSigAtomic
Num CClock
Num CTime
Num Float
Num Double
Num Int8
Num Int16
Num Int32
Num Int64
Num Int
Num Integer
(Integral a) => Num (Ratio a)
Num Word
Num Word8
Num Word16
Num Word32
Num Word64
Num CDev
Num CIno
Num CMode
Num COff
Num CPid
Num CSsize
Num CGid
Num CNlink
Num CUid
Num CCc
Num CSpeed
Num CTcflag
Num CRLim
Num Fd
subtract :: (Num a) => a -> a -> a
quotRemInt :: Int -> Int -> (Int, Int)
divModInt :: Int -> Int -> (Int, Int)
data Integer
Arbitrary-precision integers.
Constructors
S# Int#
J# Int# ByteArray#
Instances
Bits Integer
Typeable Integer
Arbitrary Integer
Ix Integer
Eq Integer
Ord Integer
Num Integer
Enum Integer
Show Integer
Read Integer
Real Integer
Integral Integer
Random Integer
zeroInteger :: Integer
int2Integer :: Int -> Integer
integer2Int :: Integer -> Int
quotRemInteger :: Integer -> Integer -> (Integer, Integer)
remInteger :: Integer -> Integer -> Integer
quotInteger :: Integer -> Integer -> Integer
gcdInteger :: Integer -> Integer -> Integer
lcmInteger :: Integer -> Integer -> Integer
divExact :: Integer -> Integer -> Integer
enumDeltaIntegerFB :: (Integer -> b -> b) -> Integer -> Integer -> b
enumDeltaInteger :: Integer -> Integer -> [Integer]
jtos :: Integer -> String -> String
Produced by Haddock version 0.4