basement-0.0.10: 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

Minimal complete definition

fromInteger

Methods

fromInteger :: Integer -> a #

Instances

Integral Double # 
Integral Float # 

Methods

fromInteger :: Integer -> Float #

Integral Int # 

Methods

fromInteger :: Integer -> Int #

Integral Int8 # 

Methods

fromInteger :: Integer -> Int8 #

Integral Int16 # 

Methods

fromInteger :: Integer -> Int16 #

Integral Int32 # 

Methods

fromInteger :: Integer -> Int32 #

Integral Int64 # 

Methods

fromInteger :: Integer -> Int64 #

Integral Integer # 
Integral Word # 

Methods

fromInteger :: Integer -> Word #

Integral Word8 # 

Methods

fromInteger :: Integer -> Word8 #

Integral Word16 # 
Integral Word32 # 
Integral Word64 # 
Integral Natural # 
Integral COff # 

Methods

fromInteger :: Integer -> COff #

Integral IntPtr # 
Integral CChar # 

Methods

fromInteger :: Integer -> CChar #

Integral CSChar # 
Integral CUChar # 
Integral CShort # 
Integral CUShort # 
Integral CInt # 

Methods

fromInteger :: Integer -> CInt #

Integral CUInt # 

Methods

fromInteger :: Integer -> CUInt #

Integral CLong # 

Methods

fromInteger :: Integer -> CLong #

Integral CULong # 
Integral CLLong # 
Integral CULLong # 
Integral CFloat # 
Integral CDouble # 
Integral CPtrdiff # 
Integral CSize # 

Methods

fromInteger :: Integer -> CSize #

Integral CWchar # 
Integral CSigAtomic # 
Integral CClock # 
Integral CTime # 

Methods

fromInteger :: Integer -> CTime #

Integral CUSeconds # 
Integral CSUSeconds # 
Integral CIntPtr # 
Integral CUIntPtr # 
Integral CIntMax # 
Integral CUIntMax # 
Integral Word128 # 
Integral Word256 # 
KnownNat n => Integral (Zn n) # 

Methods

fromInteger :: Integer -> Zn n #

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

Methods

fromInteger :: Integer -> Zn64 n #

Integral (CountOf ty) # 

Methods

fromInteger :: Integer -> CountOf ty #

Integral (Offset ty) # 

Methods

fromInteger :: Integer -> Offset ty #

class Fractional a where #

Fractional Literal support

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

Minimal complete definition

fromRational

Methods

fromRational :: Rational -> a #

class HasNegation a where #

Negation support

e.g. -(f x)

Minimal complete definition

negate

Methods

negate :: a -> a #