planet-mitchell-0.1.0: Planet Mitchell

Num.Num

Contents

Synopsis

# Documentation

class Num a where #

Basic numeric class.

Minimal complete definition

(+), (*), abs, signum, fromInteger, (negate | (-))

Methods

(+) :: a -> a -> a infixl 6 #

(-) :: a -> a -> a infixl 6 #

(*) :: a -> a -> a infixl 7 #

negate :: a -> a #

Unary negation.

abs :: a -> a #

Absolute value.

signum :: a -> a #

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
 Since: base-2.1 Instance detailsDefined in GHC.Num Methods(+) :: Int -> Int -> Int #(-) :: Int -> Int -> Int #(*) :: Int -> Int -> Int #negate :: Int -> Int #abs :: Int -> Int #signum :: Int -> Int # Since: base-2.1 Instance detailsDefined in GHC.Int Methods(+) :: Int8 -> Int8 -> Int8 #(-) :: Int8 -> Int8 -> Int8 #(*) :: Int8 -> Int8 -> Int8 #negate :: Int8 -> Int8 #abs :: Int8 -> Int8 #signum :: Int8 -> Int8 # Since: base-2.1 Instance detailsDefined in GHC.Int Methods(+) :: Int16 -> Int16 -> Int16 #(-) :: Int16 -> Int16 -> Int16 #(*) :: Int16 -> Int16 -> Int16 #abs :: Int16 -> Int16 # Since: base-2.1 Instance detailsDefined in GHC.Int Methods(+) :: Int32 -> Int32 -> Int32 #(-) :: Int32 -> Int32 -> Int32 #(*) :: Int32 -> Int32 -> Int32 #abs :: Int32 -> Int32 # Since: base-2.1 Instance detailsDefined in GHC.Int Methods(+) :: Int64 -> Int64 -> Int64 #(-) :: Int64 -> Int64 -> Int64 #(*) :: Int64 -> Int64 -> Int64 #abs :: Int64 -> Int64 # Since: base-2.1 Instance detailsDefined in GHC.Num Methods Since: base-4.8.0.0 Instance detailsDefined in GHC.Natural Methods Since: base-2.1 Instance detailsDefined in GHC.Num Methods(+) :: Word -> Word -> Word #(-) :: Word -> Word -> Word #(*) :: Word -> Word -> Word #negate :: Word -> Word #abs :: Word -> Word #signum :: Word -> Word # Since: base-2.1 Instance detailsDefined in GHC.Word Methods(+) :: Word8 -> Word8 -> Word8 #(-) :: Word8 -> Word8 -> Word8 #(*) :: Word8 -> Word8 -> Word8 #abs :: Word8 -> Word8 # Since: base-2.1 Instance detailsDefined in GHC.Word Methods(+) :: Word16 -> Word16 -> Word16 #(-) :: Word16 -> Word16 -> Word16 #(*) :: Word16 -> Word16 -> Word16 #abs :: Word16 -> Word16 # Since: base-2.1 Instance detailsDefined in GHC.Word Methods(+) :: Word32 -> Word32 -> Word32 #(-) :: Word32 -> Word32 -> Word32 #(*) :: Word32 -> Word32 -> Word32 #abs :: Word32 -> Word32 # Since: base-2.1 Instance detailsDefined in GHC.Word Methods(+) :: Word64 -> Word64 -> Word64 #(-) :: Word64 -> Word64 -> Word64 #(*) :: Word64 -> Word64 -> Word64 #abs :: Word64 -> Word64 # WARNING: + and - compute the Integer magnitude: 10^e where e is the difference between the base10Exponents of the arguments. If these methods are applied to arguments which have huge exponents this could fill up all space and crash your program! So don't apply these methods to scientific numbers coming from untrusted sources. The other methods can be used safely. Instance detailsDefined in Data.Scientific Methods Num Unique Instance detailsDefined in GHC.Event.Unique Methods(+) :: Unique -> Unique -> Unique #(-) :: Unique -> Unique -> Unique #(*) :: Unique -> Unique -> Unique #negate :: Unique -> Unique #abs :: Unique -> Unique #signum :: Unique -> Unique #fromInteger :: Integer -> Unique # Instance detailsDefined in System.Posix.Types Methods(+) :: CDev -> CDev -> CDev #(-) :: CDev -> CDev -> CDev #(*) :: CDev -> CDev -> CDev #negate :: CDev -> CDev #abs :: CDev -> CDev #signum :: CDev -> CDev # Instance detailsDefined in System.Posix.Types Methods(+) :: CIno -> CIno -> CIno #(-) :: CIno -> CIno -> CIno #(*) :: CIno -> CIno -> CIno #negate :: CIno -> CIno #abs :: CIno -> CIno #signum :: CIno -> CIno # Instance detailsDefined in System.Posix.Types Methods(+) :: CMode -> CMode -> CMode #(-) :: CMode -> CMode -> CMode #(*) :: CMode -> CMode -> CMode #abs :: CMode -> CMode # Instance detailsDefined in System.Posix.Types Methods(+) :: COff -> COff -> COff #(-) :: COff -> COff -> COff #(*) :: COff -> COff -> COff #negate :: COff -> COff #abs :: COff -> COff #signum :: COff -> COff # Instance detailsDefined in System.Posix.Types Methods(+) :: CPid -> CPid -> CPid #(-) :: CPid -> CPid -> CPid #(*) :: CPid -> CPid -> CPid #negate :: CPid -> CPid #abs :: CPid -> CPid #signum :: CPid -> CPid # Instance detailsDefined in System.Posix.Types Methods(+) :: CSsize -> CSsize -> CSsize #(-) :: CSsize -> CSsize -> CSsize #(*) :: CSsize -> CSsize -> CSsize #abs :: CSsize -> CSsize # Instance detailsDefined in System.Posix.Types Methods(+) :: CGid -> CGid -> CGid #(-) :: CGid -> CGid -> CGid #(*) :: CGid -> CGid -> CGid #negate :: CGid -> CGid #abs :: CGid -> CGid #signum :: CGid -> CGid # Instance detailsDefined in System.Posix.Types Methods(+) :: CNlink -> CNlink -> CNlink #(-) :: CNlink -> CNlink -> CNlink #(*) :: CNlink -> CNlink -> CNlink #abs :: CNlink -> CNlink # Instance detailsDefined in System.Posix.Types Methods(+) :: CUid -> CUid -> CUid #(-) :: CUid -> CUid -> CUid #(*) :: CUid -> CUid -> CUid #negate :: CUid -> CUid #abs :: CUid -> CUid #signum :: CUid -> CUid # Instance detailsDefined in System.Posix.Types Methods(+) :: CCc -> CCc -> CCc #(-) :: CCc -> CCc -> CCc #(*) :: CCc -> CCc -> CCc #negate :: CCc -> CCc #abs :: CCc -> CCc #signum :: CCc -> CCc # Instance detailsDefined in System.Posix.Types Methods(+) :: CSpeed -> CSpeed -> CSpeed #(-) :: CSpeed -> CSpeed -> CSpeed #(*) :: CSpeed -> CSpeed -> CSpeed #abs :: CSpeed -> CSpeed # Instance detailsDefined in System.Posix.Types Methods Instance detailsDefined in System.Posix.Types Methods(+) :: CRLim -> CRLim -> CRLim #(-) :: CRLim -> CRLim -> CRLim #(*) :: CRLim -> CRLim -> CRLim #abs :: CRLim -> CRLim # Instance detailsDefined in System.Posix.Types Methods Instance detailsDefined in System.Posix.Types Methods Instance detailsDefined in System.Posix.Types Methods Instance detailsDefined in System.Posix.Types Methods Instance detailsDefined in System.Posix.Types Methods Instance detailsDefined in System.Posix.Types Methods(+) :: CId -> CId -> CId #(-) :: CId -> CId -> CId #(*) :: CId -> CId -> CId #negate :: CId -> CId #abs :: CId -> CId #signum :: CId -> CId # Instance detailsDefined in System.Posix.Types Methods(+) :: CKey -> CKey -> CKey #(-) :: CKey -> CKey -> CKey #(*) :: CKey -> CKey -> CKey #negate :: CKey -> CKey #abs :: CKey -> CKey #signum :: CKey -> CKey # Instance detailsDefined in System.Posix.Types Methods(+) :: Fd -> Fd -> Fd #(-) :: Fd -> Fd -> Fd #(*) :: Fd -> Fd -> Fd #negate :: Fd -> Fd #abs :: Fd -> Fd #signum :: Fd -> Fd # Instance detailsDefined in Foreign.C.Types Methods(+) :: CChar -> CChar -> CChar #(-) :: CChar -> CChar -> CChar #(*) :: CChar -> CChar -> CChar #abs :: CChar -> CChar # Instance detailsDefined in Foreign.C.Types Methods(+) :: CSChar -> CSChar -> CSChar #(-) :: CSChar -> CSChar -> CSChar #(*) :: CSChar -> CSChar -> CSChar #abs :: CSChar -> CSChar # Instance detailsDefined in Foreign.C.Types Methods(+) :: CUChar -> CUChar -> CUChar #(-) :: CUChar -> CUChar -> CUChar #(*) :: CUChar -> CUChar -> CUChar #abs :: CUChar -> CUChar # Instance detailsDefined in Foreign.C.Types Methods(+) :: CShort -> CShort -> CShort #(-) :: CShort -> CShort -> CShort #(*) :: CShort -> CShort -> CShort #abs :: CShort -> CShort # Instance detailsDefined in Foreign.C.Types Methods Instance detailsDefined in Foreign.C.Types Methods(+) :: CInt -> CInt -> CInt #(-) :: CInt -> CInt -> CInt #(*) :: CInt -> CInt -> CInt #negate :: CInt -> CInt #abs :: CInt -> CInt #signum :: CInt -> CInt # Instance detailsDefined in Foreign.C.Types Methods(+) :: CUInt -> CUInt -> CUInt #(-) :: CUInt -> CUInt -> CUInt #(*) :: CUInt -> CUInt -> CUInt #abs :: CUInt -> CUInt # Instance detailsDefined in Foreign.C.Types Methods(+) :: CLong -> CLong -> CLong #(-) :: CLong -> CLong -> CLong #(*) :: CLong -> CLong -> CLong #abs :: CLong -> CLong # Instance detailsDefined in Foreign.C.Types Methods(+) :: CULong -> CULong -> CULong #(-) :: CULong -> CULong -> CULong #(*) :: CULong -> CULong -> CULong #abs :: CULong -> CULong # Instance detailsDefined in Foreign.C.Types Methods(+) :: CLLong -> CLLong -> CLLong #(-) :: CLLong -> CLLong -> CLLong #(*) :: CLLong -> CLLong -> CLLong #abs :: CLLong -> CLLong # Instance detailsDefined in Foreign.C.Types Methods Instance detailsDefined in Foreign.C.Types Methods(+) :: CBool -> CBool -> CBool #(-) :: CBool -> CBool -> CBool #(*) :: CBool -> CBool -> CBool #abs :: CBool -> CBool # Instance detailsDefined in Foreign.C.Types Methods(+) :: CFloat -> CFloat -> CFloat #(-) :: CFloat -> CFloat -> CFloat #(*) :: CFloat -> CFloat -> CFloat #abs :: CFloat -> CFloat # Instance detailsDefined in Foreign.C.Types Methods Instance detailsDefined in Foreign.C.Types Methods Instance detailsDefined in Foreign.C.Types Methods(+) :: CSize -> CSize -> CSize #(-) :: CSize -> CSize -> CSize #(*) :: CSize -> CSize -> CSize #abs :: CSize -> CSize # Instance detailsDefined in Foreign.C.Types Methods(+) :: CWchar -> CWchar -> CWchar #(-) :: CWchar -> CWchar -> CWchar #(*) :: CWchar -> CWchar -> CWchar #abs :: CWchar -> CWchar # Instance detailsDefined in Foreign.C.Types Methods Instance detailsDefined in Foreign.C.Types Methods(+) :: CClock -> CClock -> CClock #(-) :: CClock -> CClock -> CClock #(*) :: CClock -> CClock -> CClock #abs :: CClock -> CClock # Instance detailsDefined in Foreign.C.Types Methods(+) :: CTime -> CTime -> CTime #(-) :: CTime -> CTime -> CTime #(*) :: CTime -> CTime -> CTime #abs :: CTime -> CTime # Instance detailsDefined in Foreign.C.Types Methods Instance detailsDefined in Foreign.C.Types Methods Instance detailsDefined in Foreign.C.Types Methods Instance detailsDefined in Foreign.C.Types Methods Instance detailsDefined in Foreign.C.Types Methods Instance detailsDefined in Foreign.C.Types Methods Instance detailsDefined in Foreign.Ptr Methods Instance detailsDefined in Foreign.Ptr Methods(+) :: IntPtr -> IntPtr -> IntPtr #(-) :: IntPtr -> IntPtr -> IntPtr #(*) :: IntPtr -> IntPtr -> IntPtr #abs :: IntPtr -> IntPtr # Instance detailsDefined in Data.ExactPi Methods Instance detailsDefined in Numeric.Half Methods(+) :: Half -> Half -> Half #(-) :: Half -> Half -> Half #(*) :: Half -> Half -> Half #negate :: Half -> Half #abs :: Half -> Half #signum :: Half -> Half # Instance detailsDefined in Network.Socket.Types Methods Num B Instance detailsDefined in Data.Text.Short.Internal Methods(+) :: B -> B -> B #(-) :: B -> B -> B #(*) :: B -> B -> B #negate :: B -> B #abs :: B -> B #signum :: B -> B #fromInteger :: Integer -> B # Instance detailsDefined in Data.Time.Clock.Internal.NominalDiffTime Methods Instance detailsDefined in Data.Time.Clock.Internal.DiffTime Methods Num CodePoint Instance detailsDefined in Data.Text.Encoding Methods(+) :: CodePoint -> CodePoint -> CodePoint #(-) :: CodePoint -> CodePoint -> CodePoint #(*) :: CodePoint -> CodePoint -> CodePoint #negate :: CodePoint -> CodePoint #abs :: CodePoint -> CodePoint #signum :: CodePoint -> CodePoint #fromInteger :: Integer -> CodePoint # Num DecoderState Instance detailsDefined in Data.Text.Encoding Methods(+) :: DecoderState -> DecoderState -> DecoderState #(-) :: DecoderState -> DecoderState -> DecoderState #(*) :: DecoderState -> DecoderState -> DecoderState #negate :: DecoderState -> DecoderState #abs :: DecoderState -> DecoderState #signum :: DecoderState -> DecoderState #fromInteger :: Integer -> DecoderState # Class () (Num a) Instance detailsDefined in Data.Constraint Methodscls :: Num a :- () # () :=> (Num Double) Instance detailsDefined in Data.Constraint Methodsins :: () :- Num Double # () :=> (Num Float) Instance detailsDefined in Data.Constraint Methodsins :: () :- Num Float # () :=> (Num Int) Instance detailsDefined in Data.Constraint Methodsins :: () :- Num Int # () :=> (Num Integer) Instance detailsDefined in Data.Constraint Methodsins :: () :- Num Integer # () :=> (Num Natural) Instance detailsDefined in Data.Constraint Methodsins :: () :- Num Natural # () :=> (Num Word) Instance detailsDefined in Data.Constraint Methodsins :: () :- Num Word # Integral a => Num (Ratio a) Since: base-2.0.1 Instance detailsDefined in GHC.Real Methods(+) :: Ratio a -> Ratio a -> Ratio a #(-) :: Ratio a -> Ratio a -> Ratio a #(*) :: Ratio a -> Ratio a -> Ratio a #negate :: Ratio a -> Ratio a #abs :: Ratio a -> Ratio a #signum :: Ratio a -> Ratio a # (Ord a, Num a) => Num (Approximate a) Instance detailsDefined in Data.Approximate.Type Methods(+) :: Approximate a -> Approximate a -> Approximate a #(-) :: Approximate a -> Approximate a -> Approximate a #(*) :: Approximate a -> Approximate a -> Approximate a #abs :: Approximate a -> Approximate a # RealFloat a => Num (Complex a) Since: base-2.1 Instance detailsDefined in Data.Complex Methods(+) :: Complex a -> Complex a -> Complex a #(-) :: Complex a -> Complex a -> Complex a #(*) :: Complex a -> Complex a -> Complex a #negate :: Complex a -> Complex a #abs :: Complex a -> Complex a #signum :: Complex a -> Complex a # HasResolution a => Num (Fixed a) Since: base-2.1 Instance detailsDefined in Data.Fixed Methods(+) :: Fixed a -> Fixed a -> Fixed a #(-) :: Fixed a -> Fixed a -> Fixed a #(*) :: Fixed a -> Fixed a -> Fixed a #negate :: Fixed a -> Fixed a #abs :: Fixed a -> Fixed a #signum :: Fixed a -> Fixed a # Num a => Num (Min a) Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methods(+) :: Min a -> Min a -> Min a #(-) :: Min a -> Min a -> Min a #(*) :: Min a -> Min a -> Min a #negate :: Min a -> Min a #abs :: Min a -> Min a #signum :: Min a -> Min a # Num a => Num (Max a) Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methods(+) :: Max a -> Max a -> Max a #(-) :: Max a -> Max a -> Max a #(*) :: Max a -> Max a -> Max a #negate :: Max a -> Max a #abs :: Max a -> Max a #signum :: Max a -> Max a # Num a => Num (Identity a) Instance detailsDefined in Data.Functor.Identity Methods(+) :: Identity a -> Identity a -> Identity a #(-) :: Identity a -> Identity a -> Identity a #(*) :: Identity a -> Identity a -> Identity a #negate :: Identity a -> Identity a #abs :: Identity a -> Identity a #signum :: Identity a -> Identity a # Num a => Num (Sum a) Instance detailsDefined in Data.Semigroup.Internal Methods(+) :: Sum a -> Sum a -> Sum a #(-) :: Sum a -> Sum a -> Sum a #(*) :: Sum a -> Sum a -> Sum a #negate :: Sum a -> Sum a #abs :: Sum a -> Sum a #signum :: Sum a -> Sum a # Num a => Num (Product a) Instance detailsDefined in Data.Semigroup.Internal Methods(+) :: Product a -> Product a -> Product a #(-) :: Product a -> Product a -> Product a #(*) :: Product a -> Product a -> Product a #negate :: Product a -> Product a #abs :: Product a -> Product a #signum :: Product a -> Product a # Num a => Num (Down a) Since: base-4.11.0.0 Instance detailsDefined in Data.Ord Methods(+) :: Down a -> Down a -> Down a #(-) :: Down a -> Down a -> Down a #(*) :: Down a -> Down a -> Down a #negate :: Down a -> Down a #abs :: Down a -> Down a #signum :: Down a -> Down a # (Precise a, RealFloat a) => Num (Log a) Instance detailsDefined in Numeric.Log Methods(+) :: Log a -> Log a -> Log a #(-) :: Log a -> Log a -> Log a #(*) :: Log a -> Log a -> Log a #negate :: Log a -> Log a #abs :: Log a -> Log a #signum :: Log a -> Log a # Num a => Num (Managed a) Instance detailsDefined in Control.Monad.Managed Methods(+) :: Managed a -> Managed a -> Managed a #(-) :: Managed a -> Managed a -> Managed a #(*) :: Managed a -> Managed a -> Managed a #negate :: Managed a -> Managed a #abs :: Managed a -> Managed a #signum :: Managed a -> Managed a # Num a => Num (Bound a) Instance detailsDefined in Data.Semilattice.Bound Methods(+) :: Bound a -> Bound a -> Bound a #(-) :: Bound a -> Bound a -> Bound a #(*) :: Bound a -> Bound a -> Bound a #negate :: Bound a -> Bound a #abs :: Bound a -> Bound a #signum :: Bound a -> Bound a # Num a => Num (Order a) Instance detailsDefined in Data.Semilattice.Order Methods(+) :: Order a -> Order a -> Order a #(-) :: Order a -> Order a -> Order a #(*) :: Order a -> Order a -> Order a #negate :: Order a -> Order a #abs :: Order a -> Order a #signum :: Order a -> Order a # Num a => Num (Meeting a) Instance detailsDefined in Data.Semilattice.Meet Methods(+) :: Meeting a -> Meeting a -> Meeting a #(-) :: Meeting a -> Meeting a -> Meeting a #(*) :: Meeting a -> Meeting a -> Meeting a #negate :: Meeting a -> Meeting a #abs :: Meeting a -> Meeting a #signum :: Meeting a -> Meeting a # Num a => Num (GreaterThan a) Instance detailsDefined in Data.Semilattice.Meet Methods(+) :: GreaterThan a -> GreaterThan a -> GreaterThan a #(-) :: GreaterThan a -> GreaterThan a -> GreaterThan a #(*) :: GreaterThan a -> GreaterThan a -> GreaterThan a #abs :: GreaterThan a -> GreaterThan a # Num a => Num (Joining a) Instance detailsDefined in Data.Semilattice.Join Methods(+) :: Joining a -> Joining a -> Joining a #(-) :: Joining a -> Joining a -> Joining a #(*) :: Joining a -> Joining a -> Joining a #negate :: Joining a -> Joining a #abs :: Joining a -> Joining a #signum :: Joining a -> Joining a # Num a => Num (LessThan a) Instance detailsDefined in Data.Semilattice.Join Methods(+) :: LessThan a -> LessThan a -> LessThan a #(-) :: LessThan a -> LessThan a -> LessThan a #(*) :: LessThan a -> LessThan a -> LessThan a #negate :: LessThan a -> LessThan a #abs :: LessThan a -> LessThan a #signum :: LessThan a -> LessThan a # Class (Num a) (Fractional a) Instance detailsDefined in Data.Constraint Methods (Integral a) :=> (Num (Ratio a)) Instance detailsDefined in Data.Constraint Methodsins :: Integral a :- Num (Ratio a) # (Num a) :=> (Num (Identity a)) Instance detailsDefined in Data.Constraint Methodsins :: Num a :- Num (Identity a) # (Num a) :=> (Num (Const a b)) Instance detailsDefined in Data.Constraint Methodsins :: Num a :- Num (Const a b) # (RealFloat a) :=> (Num (Complex a)) Instance detailsDefined in Data.Constraint Methods Num a => Num (Op a b) Instance detailsDefined in Data.Functor.Contravariant Methods(+) :: Op a b -> Op a b -> Op a b #(-) :: Op a b -> Op a b -> Op a b #(*) :: Op a b -> Op a b -> Op a b #negate :: Op a b -> Op a b #abs :: Op a b -> Op a b #signum :: Op a b -> Op a b #fromInteger :: Integer -> Op a b # Num b => Num (Fold a b) Instance detailsDefined in Control.Foldl Methods(+) :: Fold a b -> Fold a b -> Fold a b #(-) :: Fold a b -> Fold a b -> Fold a b #(*) :: Fold a b -> Fold a b -> Fold a b #negate :: Fold a b -> Fold a b #abs :: Fold a b -> Fold a b #signum :: Fold a b -> Fold a b #fromInteger :: Integer -> Fold a b # (Monad m, Num a) => Num (ListT m a) Instance detailsDefined in List.Transformer Methods(+) :: ListT m a -> ListT m a -> ListT m a #(-) :: ListT m a -> ListT m a -> ListT m a #(*) :: ListT m a -> ListT m a -> ListT m a #negate :: ListT m a -> ListT m a #abs :: ListT m a -> ListT m a #signum :: ListT m a -> ListT m a #fromInteger :: Integer -> ListT m a # Class (Num a, Ord a) (Real a) Instance detailsDefined in Data.Constraint Methodscls :: Real a :- (Num a, Ord a) # Num a => Num (Const a b) Instance detailsDefined in Data.Functor.Const Methods(+) :: Const a b -> Const a b -> Const a b #(-) :: Const a b -> Const a b -> Const a b #(*) :: Const a b -> Const a b -> Const a b #negate :: Const a b -> Const a b #abs :: Const a b -> Const a b #signum :: Const a b -> Const a b #fromInteger :: Integer -> Const a b # Num (f a) => Num (Alt f a) Instance detailsDefined in Data.Semigroup.Internal Methods(+) :: Alt f a -> Alt f a -> Alt f a #(-) :: Alt f a -> Alt f a -> Alt f a #(*) :: Alt f a -> Alt f a -> Alt f a #negate :: Alt f a -> Alt f a #abs :: Alt f a -> Alt f a #signum :: Alt f a -> Alt f a #fromInteger :: Integer -> Alt f a # (Monad m, Num b) => Num (FoldM m a b) Instance detailsDefined in Control.Foldl Methods(+) :: FoldM m a b -> FoldM m a b -> FoldM m a b #(-) :: FoldM m a b -> FoldM m a b -> FoldM m a b #(*) :: FoldM m a b -> FoldM m a b -> FoldM m a b #negate :: FoldM m a b -> FoldM m a b #abs :: FoldM m a b -> FoldM m a b #signum :: FoldM m a b -> FoldM m a b #fromInteger :: Integer -> FoldM m a b # Num a => Num (Tagged s a) Instance detailsDefined in Data.Tagged Methods(+) :: Tagged s a -> Tagged s a -> Tagged s a #(-) :: Tagged s a -> Tagged s a -> Tagged s a #(*) :: Tagged s a -> Tagged s a -> Tagged s a #negate :: Tagged s a -> Tagged s a #abs :: Tagged s a -> Tagged s a #signum :: Tagged s a -> Tagged s a #fromInteger :: Integer -> Tagged s a #

(^) :: (Num a, Integral b) => a -> b -> a infixr 8 #

raise a number to a non-negative integral power

subtract :: Num a => a -> a -> a #

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.

Arguments

 :: 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 Int -> ReadS a

Reads an unsigned Integral value in an arbitrary base.

Read an unsigned number in decimal notation.

>>> readDec "0644"
[(644,"")]


Read an unsigned number in octal notation.

>>> readOct "0644"
[(420,"")]


>>> readHex "deadbeef"
[(3735928559,"")]