Num Double # | Note that due to the presence of NaN , not all elements of Double have an
additive inverse. >>> 0/0 + (negate 0/0 :: Double)
NaN
Also note that due to the presence of -0, Double 's Num instance doesn't
have an additive identity >>> 0 + (-0 :: Double)
0.0
Since: base-2.1 |
Instance detailsDefined in GHC.Float |
Num Float # | Note that due to the presence of NaN , not all elements of Float have an
additive inverse. >>> 0/0 + (negate 0/0 :: Float)
NaN
Also note that due to the presence of -0, Float 's Num instance doesn't
have an additive identity >>> 0 + (-0 :: Float)
0.0
Since: base-2.1 |
Instance detailsDefined in GHC.Float |
Num Int # | Since: base-2.1 |
Instance detailsDefined in GHC.Num |
Num Int8 # | Since: base-2.1 |
Instance detailsDefined in GHC.Int |
Num Int16 # | Since: base-2.1 |
Instance detailsDefined in GHC.Int |
Num Int32 # | Since: base-2.1 |
Instance detailsDefined in GHC.Int |
Num Int64 # | Since: base-2.1 |
Instance detailsDefined in GHC.Int |
Num Integer # | Since: base-2.1 |
Instance detailsDefined in GHC.Num |
Num Natural # | 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.Num |
Num Word # | Since: base-2.1 |
Instance detailsDefined in GHC.Num |
Num Word8 # | Since: base-2.1 |
Instance detailsDefined in GHC.Word |
Num Word16 # | Since: base-2.1 |
Instance detailsDefined in GHC.Word |
Num Word32 # | Since: base-2.1 |
Instance detailsDefined in GHC.Word |
Num Word64 # | Since: base-2.1 |
Instance detailsDefined in GHC.Word |
Num IntPtr # | |
Instance detailsDefined in Foreign.Ptr |
Num WordPtr # | |
Instance detailsDefined in Foreign.Ptr |
Num CUIntMax # | |
Instance detailsDefined in Foreign.C.Types |
Num CIntMax # | |
Instance detailsDefined in Foreign.C.Types |
Num CUIntPtr # | |
Instance detailsDefined in Foreign.C.Types |
Num CIntPtr # | |
Instance detailsDefined in Foreign.C.Types |
Num CSUSeconds # | |
Instance detailsDefined in Foreign.C.Types |
Num CUSeconds # | |
Instance detailsDefined in Foreign.C.Types |
Num CTime # | |
Instance detailsDefined in Foreign.C.Types |
Num CClock # | |
Instance detailsDefined in Foreign.C.Types |
Num CSigAtomic # | |
Instance detailsDefined in Foreign.C.Types |
Num CWchar # | |
Instance detailsDefined in Foreign.C.Types |
Num CSize # | |
Instance detailsDefined in Foreign.C.Types |
Num CPtrdiff # | |
Instance detailsDefined in Foreign.C.Types |
Num CDouble # | |
Instance detailsDefined in Foreign.C.Types |
Num CFloat # | |
Instance detailsDefined in Foreign.C.Types |
Num CBool # | |
Instance detailsDefined in Foreign.C.Types |
Num CULLong # | |
Instance detailsDefined in Foreign.C.Types |
Num CLLong # | |
Instance detailsDefined in Foreign.C.Types |
Num CULong # | |
Instance detailsDefined in Foreign.C.Types |
Num CLong # | |
Instance detailsDefined in Foreign.C.Types |
Num CUInt # | |
Instance detailsDefined in Foreign.C.Types |
Num CInt # | |
Instance detailsDefined in Foreign.C.Types |
Num CUShort # | |
Instance detailsDefined in Foreign.C.Types |
Num CShort # | |
Instance detailsDefined in Foreign.C.Types |
Num CUChar # | |
Instance detailsDefined in Foreign.C.Types |
Num CSChar # | |
Instance detailsDefined in Foreign.C.Types |
Num CChar # | |
Instance detailsDefined in Foreign.C.Types |
Num Fd # | |
Instance detailsDefined in System.Posix.Types |
Num CNfds # | |
Instance detailsDefined in System.Posix.Types |
Num CSocklen # | |
Instance detailsDefined in System.Posix.Types |
Num CKey # | |
Instance detailsDefined in System.Posix.Types |
Num CId # | |
Instance detailsDefined in System.Posix.Types |
Num CFsFilCnt # | |
Instance detailsDefined in System.Posix.Types |
Num CFsBlkCnt # | |
Instance detailsDefined in System.Posix.Types |
Num CClockId # | |
Instance detailsDefined in System.Posix.Types |
Num CBlkCnt # | |
Instance detailsDefined in System.Posix.Types |
Num CBlkSize # | |
Instance detailsDefined in System.Posix.Types |
Num CRLim # | |
Instance detailsDefined in System.Posix.Types |
Num CTcflag # | |
Instance detailsDefined in System.Posix.Types |
Num CSpeed # | |
Instance detailsDefined in System.Posix.Types |
Num CCc # | |
Instance detailsDefined in System.Posix.Types |
Num CUid # | |
Instance detailsDefined in System.Posix.Types |
Num CNlink # | |
Instance detailsDefined in System.Posix.Types |
Num CGid # | |
Instance detailsDefined in System.Posix.Types |
Num CSsize # | |
Instance detailsDefined in System.Posix.Types |
Num CPid # | |
Instance detailsDefined in System.Posix.Types |
Num COff # | |
Instance detailsDefined in System.Posix.Types |
Num CMode # | |
Instance detailsDefined in System.Posix.Types |
Num CIno # | |
Instance detailsDefined in System.Posix.Types |
Num CDev # | |
Instance detailsDefined in System.Posix.Types |
Integral a => Num (Ratio a) # | Since: base-2.0.1 |
Instance detailsDefined in GHC.Real |
Num a => Num (Down a) # | Since: base-4.11.0.0 |
Instance detailsDefined in Data.Ord |
Num a => Num (Product a) # | Since: base-4.7.0.0 |
Instance detailsDefined in Data.Semigroup.Internal |
Num a => Num (Sum a) # | Since: base-4.7.0.0 |
Instance detailsDefined in Data.Semigroup.Internal |
Num a => Num (Identity a) # | Since: base-4.9.0.0 |
Instance detailsDefined in Data.Functor.Identity |
Num a => Num (Max a) # | Since: base-4.9.0.0 |
Instance detailsDefined in Data.Semigroup |
Num a => Num (Min a) # | Since: base-4.9.0.0 |
Instance detailsDefined in Data.Semigroup |
RealFloat a => Num (Complex a) # | Since: base-2.1 |
Instance detailsDefined in Data.Complex |
Num a => Num (Op a b) # | |
Instance detailsDefined in Data.Functor.Contravariant |
HasResolution a => Num (Fixed a) # | Since: base-2.1 |
Instance detailsDefined in Data.Fixed |
Num (f a) => Num (Alt f a) # | Since: base-4.8.0.0 |
Instance detailsDefined in Data.Semigroup.Internal |
(Applicative f, Num a) => Num (Ap f a) # | 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 Data.Monoid |
Num a => Num (Const a b) # | Since: base-4.9.0.0 |
Instance detailsDefined in Data.Functor.Const |