Num CBool Source # | |
Instance detailsDefined in GHC.Internal.Foreign.C.Types |
Num CChar Source # | |
Instance detailsDefined in GHC.Internal.Foreign.C.Types |
Num CClock Source # | |
Instance detailsDefined in GHC.Internal.Foreign.C.Types |
Num CDouble Source # | |
Instance detailsDefined in GHC.Internal.Foreign.C.Types |
Num CFloat Source # | |
Instance detailsDefined in GHC.Internal.Foreign.C.Types |
Num CInt Source # | |
Instance detailsDefined in GHC.Internal.Foreign.C.Types |
Num CIntMax Source # | |
Instance detailsDefined in GHC.Internal.Foreign.C.Types |
Num CIntPtr Source # | |
Instance detailsDefined in GHC.Internal.Foreign.C.Types |
Num CLLong Source # | |
Instance detailsDefined in GHC.Internal.Foreign.C.Types |
Num CLong Source # | |
Instance detailsDefined in GHC.Internal.Foreign.C.Types |
Num CPtrdiff Source # | |
Instance detailsDefined in GHC.Internal.Foreign.C.Types |
Num CSChar Source # | |
Instance detailsDefined in GHC.Internal.Foreign.C.Types |
Num CSUSeconds Source # | |
Instance detailsDefined in GHC.Internal.Foreign.C.Types |
Num CShort Source # | |
Instance detailsDefined in GHC.Internal.Foreign.C.Types |
Num CSigAtomic Source # | |
Instance detailsDefined in GHC.Internal.Foreign.C.Types |
Num CSize Source # | |
Instance detailsDefined in GHC.Internal.Foreign.C.Types |
Num CTime Source # | |
Instance detailsDefined in GHC.Internal.Foreign.C.Types |
Num CUChar Source # | |
Instance detailsDefined in GHC.Internal.Foreign.C.Types |
Num CUInt Source # | |
Instance detailsDefined in GHC.Internal.Foreign.C.Types |
Num CUIntMax Source # | |
Instance detailsDefined in GHC.Internal.Foreign.C.Types |
Num CUIntPtr Source # | |
Instance detailsDefined in GHC.Internal.Foreign.C.Types |
Num CULLong Source # | |
Instance detailsDefined in GHC.Internal.Foreign.C.Types |
Num CULong Source # | |
Instance detailsDefined in GHC.Internal.Foreign.C.Types |
Num CUSeconds Source # | |
Instance detailsDefined in GHC.Internal.Foreign.C.Types |
Num CUShort Source # | |
Instance detailsDefined in GHC.Internal.Foreign.C.Types |
Num CWchar Source # | |
Instance detailsDefined in GHC.Internal.Foreign.C.Types |
Num IntPtr Source # | |
Instance detailsDefined in GHC.Internal.Foreign.Ptr |
Num WordPtr Source # | |
Instance detailsDefined in GHC.Internal.Foreign.Ptr |
Num Int16 Source # | @since base-2.01 |
Instance detailsDefined in GHC.Internal.Int |
Num Int32 Source # | @since base-2.01 |
Instance detailsDefined in GHC.Internal.Int |
Num Int64 Source # | @since base-2.01 |
Instance detailsDefined in GHC.Internal.Int |
Num Int8 Source # | @since base-2.01 |
Instance detailsDefined in GHC.Internal.Int |
Num CBlkCnt Source # | |
Instance detailsDefined in GHC.Internal.System.Posix.Types |
Num CBlkSize Source # | |
Instance detailsDefined in GHC.Internal.System.Posix.Types |
Num CCc Source # | |
Instance detailsDefined in GHC.Internal.System.Posix.Types |
Num CClockId Source # | |
Instance detailsDefined in GHC.Internal.System.Posix.Types |
Num CDev Source # | |
Instance detailsDefined in GHC.Internal.System.Posix.Types |
Num CFsBlkCnt Source # | |
Instance detailsDefined in GHC.Internal.System.Posix.Types |
Num CFsFilCnt Source # | |
Instance detailsDefined in GHC.Internal.System.Posix.Types |
Num CGid Source # | |
Instance detailsDefined in GHC.Internal.System.Posix.Types |
Num CId Source # | |
Instance detailsDefined in GHC.Internal.System.Posix.Types |
Num CIno Source # | |
Instance detailsDefined in GHC.Internal.System.Posix.Types |
Num CKey Source # | |
Instance detailsDefined in GHC.Internal.System.Posix.Types |
Num CMode Source # | |
Instance detailsDefined in GHC.Internal.System.Posix.Types |
Num CNfds Source # | |
Instance detailsDefined in GHC.Internal.System.Posix.Types |
Num CNlink Source # | |
Instance detailsDefined in GHC.Internal.System.Posix.Types |
Num COff Source # | |
Instance detailsDefined in GHC.Internal.System.Posix.Types |
Num CPid Source # | |
Instance detailsDefined in GHC.Internal.System.Posix.Types |
Num CRLim Source # | |
Instance detailsDefined in GHC.Internal.System.Posix.Types |
Num CSocklen Source # | |
Instance detailsDefined in GHC.Internal.System.Posix.Types |
Num CSpeed Source # | |
Instance detailsDefined in GHC.Internal.System.Posix.Types |
Num CSsize Source # | |
Instance detailsDefined in GHC.Internal.System.Posix.Types |
Num CTcflag Source # | |
Instance detailsDefined in GHC.Internal.System.Posix.Types |
Num CUid Source # | |
Instance detailsDefined in GHC.Internal.System.Posix.Types |
Num Fd Source # | |
Instance detailsDefined in GHC.Internal.System.Posix.Types |
Num Word16 Source # | @since base-2.01 |
Instance detailsDefined in GHC.Internal.Word |
Num Word32 Source # | @since base-2.01 |
Instance detailsDefined in GHC.Internal.Word |
Num Word64 Source # | @since base-2.01 |
Instance detailsDefined in GHC.Internal.Word |
Num Word8 Source # | @since base-2.01 |
Instance detailsDefined in GHC.Internal.Word |
Num Integer Source # | @since base-2.01 |
Instance detailsDefined in GHC.Internal.Num |
Num Natural Source # | Note that Natural 's Num instance isn't a ring: no element but 0 has an
additive inverse. It is a semiring though. @since base-4.8.0.0 |
Instance detailsDefined in GHC.Internal.Num |
Num Double Source # | @since base-2.01 This instance implements IEEE 754 standard with all its usual pitfalls
about NaN, infinities and negative zero.
Neither addition nor multiplication are associative or distributive: >>> (0.1 + 0.1) + 0.4 == 0.1 + (0.1 + 0.4)
False
>>> (0.1 + 0.2) * 0.3 == 0.1 * 0.3 + 0.2 * 0.3
False
>>> (0.1 * 0.1) * 0.3 == 0.1 * (0.1 * 0.3)
False
|
Instance detailsDefined in GHC.Internal.Float |
Num Float Source # | @since base-2.01 This instance implements IEEE 754 standard with all its usual pitfalls
about NaN, infinities and negative zero.
Neither addition nor multiplication are associative or distributive: >>> (0.1 + 0.1 :: Float) + 0.5 == 0.1 + (0.1 + 0.5)
False
>>> (0.1 + 0.2 :: Float) * 0.9 == 0.1 * 0.9 + 0.2 * 0.9
False
>>> (0.1 * 0.1 :: Float) * 0.9 == 0.1 * (0.1 * 0.9)
False
|
Instance detailsDefined in GHC.Internal.Float |
Num Int Source # | @since base-2.01 |
Instance detailsDefined in GHC.Internal.Num |
Num Word Source # | @since base-2.01 |
Instance detailsDefined in GHC.Internal.Num |
Num a => Num (Identity a) Source # | @since base-4.9.0.0 |
Instance detailsDefined in GHC.Internal.Data.Functor.Identity |
Num a => Num (Down a) Source # | @since base-4.11.0.0 |
Instance detailsDefined in GHC.Internal.Data.Ord |
Num a => Num (Product a) Source # | @since base-4.7.0.0 |
Instance detailsDefined in GHC.Internal.Data.Semigroup.Internal |
Num a => Num (Sum a) Source # | @since base-4.7.0.0 |
Instance detailsDefined in GHC.Internal.Data.Semigroup.Internal |
Integral a => Num (Ratio a) Source # | @since base-2.0.1 |
Instance detailsDefined in GHC.Internal.Real |
Num a => Num (Const a b) Source # | @since base-4.9.0.0 |
Instance detailsDefined in GHC.Internal.Data.Functor.Const |
(Applicative f, Num a) => Num (Ap f a) Source # | Note that even if the underlying Num and Applicative instances are
lawful, for most Applicative s, this instance will not be lawful. If you use
this instance with the list Applicative , the following customary laws will
not hold: Commutativity: >>> Ap [10,20] + Ap [1,2]
Ap {getAp = [11,12,21,22]}
>>> Ap [1,2] + Ap [10,20]
Ap {getAp = [11,21,12,22]}
Additive inverse: >>> Ap [] + negate (Ap [])
Ap {getAp = []}
>>> fromInteger 0 :: Ap [] Int
Ap {getAp = [0]}
Distributivity: >>> Ap [1,2] * (3 + 4)
Ap {getAp = [7,14]}
>>> (Ap [1,2] * 3) + (Ap [1,2] * 4)
Ap {getAp = [7,11,10,14]}
@since base-4.12.0.0 |
Instance detailsDefined in GHC.Internal.Data.Monoid |
Num (f a) => Num (Alt f a) Source # | @since base-4.8.0.0 |
Instance detailsDefined in GHC.Internal.Data.Semigroup.Internal |