basement-0.0.12: Foundation scrap box of array & string
LicenseBSD-style
MaintainerFoundation
Safe HaskellNone
LanguageHaskell2010

Basement.Compat.NumLiteral

Description

Literal support for Integral and Fractional

Synopsis

Documentation

class Integral a where #

Integral Literal support

e.g. 123 :: Integer 123 :: Word8

Methods

fromInteger :: Integer -> a #

Instances

Instances details
Integral Double # 
Instance details

Defined in Basement.Compat.NumLiteral

Integral Float # 
Instance details

Defined in Basement.Compat.NumLiteral

Methods

fromInteger :: Integer -> Float #

Integral Int # 
Instance details

Defined in Basement.Compat.NumLiteral

Methods

fromInteger :: Integer -> Int #

Integral Int8 # 
Instance details

Defined in Basement.Compat.NumLiteral

Methods

fromInteger :: Integer -> Int8 #

Integral Int16 # 
Instance details

Defined in Basement.Compat.NumLiteral

Methods

fromInteger :: Integer -> Int16 #

Integral Int32 # 
Instance details

Defined in Basement.Compat.NumLiteral

Methods

fromInteger :: Integer -> Int32 #

Integral Int64 # 
Instance details

Defined in Basement.Compat.NumLiteral

Methods

fromInteger :: Integer -> Int64 #

Integral Integer # 
Instance details

Defined in Basement.Compat.NumLiteral

Integral Natural # 
Instance details

Defined in Basement.Compat.NumLiteral

Integral Word # 
Instance details

Defined in Basement.Compat.NumLiteral

Methods

fromInteger :: Integer -> Word #

Integral Word8 # 
Instance details

Defined in Basement.Compat.NumLiteral

Methods

fromInteger :: Integer -> Word8 #

Integral Word16 # 
Instance details

Defined in Basement.Compat.NumLiteral

Integral Word32 # 
Instance details

Defined in Basement.Compat.NumLiteral

Integral Word64 # 
Instance details

Defined in Basement.Compat.NumLiteral

Integral COff # 
Instance details

Defined in Basement.Compat.NumLiteral

Methods

fromInteger :: Integer -> COff #

Integral CChar # 
Instance details

Defined in Basement.Compat.NumLiteral

Methods

fromInteger :: Integer -> CChar #

Integral CSChar # 
Instance details

Defined in Basement.Compat.NumLiteral

Integral CUChar # 
Instance details

Defined in Basement.Compat.NumLiteral

Integral CShort # 
Instance details

Defined in Basement.Compat.NumLiteral

Integral CUShort # 
Instance details

Defined in Basement.Compat.NumLiteral

Integral CInt # 
Instance details

Defined in Basement.Compat.NumLiteral

Methods

fromInteger :: Integer -> CInt #

Integral CUInt # 
Instance details

Defined in Basement.Compat.NumLiteral

Methods

fromInteger :: Integer -> CUInt #

Integral CLong # 
Instance details

Defined in Basement.Compat.NumLiteral

Methods

fromInteger :: Integer -> CLong #

Integral CULong # 
Instance details

Defined in Basement.Compat.NumLiteral

Integral CLLong # 
Instance details

Defined in Basement.Compat.NumLiteral

Integral CULLong # 
Instance details

Defined in Basement.Compat.NumLiteral

Integral CBool # 
Instance details

Defined in Basement.Compat.NumLiteral

Methods

fromInteger :: Integer -> CBool #

Integral CFloat # 
Instance details

Defined in Basement.Compat.NumLiteral

Integral CDouble # 
Instance details

Defined in Basement.Compat.NumLiteral

Integral CPtrdiff # 
Instance details

Defined in Basement.Compat.NumLiteral

Integral CSize # 
Instance details

Defined in Basement.Compat.NumLiteral

Methods

fromInteger :: Integer -> CSize #

Integral CWchar # 
Instance details

Defined in Basement.Compat.NumLiteral

Integral CSigAtomic # 
Instance details

Defined in Basement.Compat.NumLiteral

Integral CClock # 
Instance details

Defined in Basement.Compat.NumLiteral

Integral CTime # 
Instance details

Defined in Basement.Compat.NumLiteral

Methods

fromInteger :: Integer -> CTime #

Integral CUSeconds # 
Instance details

Defined in Basement.Compat.NumLiteral

Integral CSUSeconds # 
Instance details

Defined in Basement.Compat.NumLiteral

Integral CIntPtr # 
Instance details

Defined in Basement.Compat.NumLiteral

Integral CUIntPtr # 
Instance details

Defined in Basement.Compat.NumLiteral

Integral CIntMax # 
Instance details

Defined in Basement.Compat.NumLiteral

Integral CUIntMax # 
Instance details

Defined in Basement.Compat.NumLiteral

Integral IntPtr # 
Instance details

Defined in Basement.Compat.NumLiteral

Integral Word128 # 
Instance details

Defined in Basement.Types.Word128

Integral Word256 # 
Instance details

Defined in Basement.Types.Word256

KnownNat n => Integral (Zn n) # 
Instance details

Defined in Basement.Bounded

Methods

fromInteger :: Integer -> Zn n #

(KnownNat n, NatWithinBound Word64 n) => Integral (Zn64 n) # 
Instance details

Defined in Basement.Bounded

Methods

fromInteger :: Integer -> Zn64 n #

Integral (CountOf ty) # 
Instance details

Defined in Basement.Types.OffsetSize

Methods

fromInteger :: Integer -> CountOf ty #

Integral (Offset ty) # 
Instance details

Defined in Basement.Types.OffsetSize

Methods

fromInteger :: Integer -> Offset ty #

class Fractional a where #

Fractional Literal support

e.g. 1.2 :: Double 0.03 :: Float

Methods

fromRational :: Rational -> a #

Instances

Instances details
Fractional Double # 
Instance details

Defined in Basement.Compat.NumLiteral

Fractional Float # 
Instance details

Defined in Basement.Compat.NumLiteral

Fractional Rational # 
Instance details

Defined in Basement.Compat.NumLiteral

Fractional CFloat # 
Instance details

Defined in Basement.Compat.NumLiteral

Fractional CDouble # 
Instance details

Defined in Basement.Compat.NumLiteral

class HasNegation a where #

Negation support

e.g. -(f x)

Methods

negate :: a -> a #

Instances

Instances details
HasNegation Double # 
Instance details

Defined in Basement.Compat.NumLiteral

Methods

negate :: Double -> Double #

HasNegation Float # 
Instance details

Defined in Basement.Compat.NumLiteral

Methods

negate :: Float -> Float #

HasNegation Int # 
Instance details

Defined in Basement.Compat.NumLiteral

Methods

negate :: Int -> Int #

HasNegation Int8 # 
Instance details

Defined in Basement.Compat.NumLiteral

Methods

negate :: Int8 -> Int8 #

HasNegation Int16 # 
Instance details

Defined in Basement.Compat.NumLiteral

Methods

negate :: Int16 -> Int16 #

HasNegation Int32 # 
Instance details

Defined in Basement.Compat.NumLiteral

Methods

negate :: Int32 -> Int32 #

HasNegation Int64 # 
Instance details

Defined in Basement.Compat.NumLiteral

Methods

negate :: Int64 -> Int64 #

HasNegation Integer # 
Instance details

Defined in Basement.Compat.NumLiteral

Methods

negate :: Integer -> Integer #

HasNegation Word # 
Instance details

Defined in Basement.Compat.NumLiteral

Methods

negate :: Word -> Word #

HasNegation Word8 # 
Instance details

Defined in Basement.Compat.NumLiteral

Methods

negate :: Word8 -> Word8 #

HasNegation Word16 # 
Instance details

Defined in Basement.Compat.NumLiteral

Methods

negate :: Word16 -> Word16 #

HasNegation Word32 # 
Instance details

Defined in Basement.Compat.NumLiteral

Methods

negate :: Word32 -> Word32 #

HasNegation Word64 # 
Instance details

Defined in Basement.Compat.NumLiteral

Methods

negate :: Word64 -> Word64 #

HasNegation CChar # 
Instance details

Defined in Basement.Compat.NumLiteral

Methods

negate :: CChar -> CChar #

HasNegation CSChar # 
Instance details

Defined in Basement.Compat.NumLiteral

Methods

negate :: CSChar -> CSChar #

HasNegation CShort # 
Instance details

Defined in Basement.Compat.NumLiteral

Methods

negate :: CShort -> CShort #

HasNegation CInt # 
Instance details

Defined in Basement.Compat.NumLiteral

Methods

negate :: CInt -> CInt #

HasNegation CLong # 
Instance details

Defined in Basement.Compat.NumLiteral

Methods

negate :: CLong -> CLong #

HasNegation CLLong # 
Instance details

Defined in Basement.Compat.NumLiteral

Methods

negate :: CLLong -> CLLong #

HasNegation CFloat # 
Instance details

Defined in Basement.Compat.NumLiteral

Methods

negate :: CFloat -> CFloat #

HasNegation CDouble # 
Instance details

Defined in Basement.Compat.NumLiteral

Methods

negate :: CDouble -> CDouble #

HasNegation CPtrdiff # 
Instance details

Defined in Basement.Compat.NumLiteral

Methods

negate :: CPtrdiff -> CPtrdiff #

HasNegation CWchar # 
Instance details

Defined in Basement.Compat.NumLiteral

Methods

negate :: CWchar -> CWchar #

HasNegation CIntMax # 
Instance details

Defined in Basement.Compat.NumLiteral

Methods

negate :: CIntMax -> CIntMax #

HasNegation Word128 # 
Instance details

Defined in Basement.Types.Word128

Methods

negate :: Word128 -> Word128 #

HasNegation Word256 # 
Instance details

Defined in Basement.Types.Word256

Methods

negate :: Word256 -> Word256 #