basement-0.0.7: 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 Source #

Integral Literal support

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

Minimal complete definition

fromInteger

Methods

fromInteger :: Integer -> a Source #

Instances

Integral Double Source # 
Integral Float Source # 
Integral Int Source # 
Integral Int8 Source # 
Integral Int16 Source # 
Integral Int32 Source # 
Integral Int64 Source # 
Integral Integer Source # 
Integral Natural Source # 
Integral Word Source # 
Integral Word8 Source # 
Integral Word16 Source # 
Integral Word32 Source # 
Integral Word64 Source # 
Integral COff Source # 
Integral CChar Source # 
Integral CSChar Source # 
Integral CUChar Source # 
Integral CShort Source # 
Integral CUShort Source # 
Integral CInt Source # 
Integral CUInt Source # 
Integral CLong Source # 
Integral CULong Source # 
Integral CLLong Source # 
Integral CULLong Source # 
Integral CBool Source # 
Integral CFloat Source # 
Integral CDouble Source # 
Integral CPtrdiff Source # 
Integral CSize Source # 
Integral CWchar Source # 
Integral CSigAtomic Source # 
Integral CClock Source # 
Integral CTime Source # 
Integral CUSeconds Source # 
Integral CSUSeconds Source # 
Integral CIntPtr Source # 
Integral CUIntPtr Source # 
Integral CIntMax Source # 
Integral CUIntMax Source # 
Integral IntPtr Source # 
Integral Word128 Source # 
Integral Word256 Source # 
Integral (CountOf ty) Source # 
Integral (Offset ty) Source # 

class Fractional a where Source #

Fractional Literal support

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

Minimal complete definition

fromRational

Methods

fromRational :: Rational -> a Source #

class HasNegation a where Source #

Negation support

e.g. -(f x)

Minimal complete definition

negate

Methods

negate :: a -> a Source #

Instances

HasNegation Double Source # 

Methods

negate :: Double -> Double Source #

HasNegation Float Source # 

Methods

negate :: Float -> Float Source #

HasNegation Int Source # 

Methods

negate :: Int -> Int Source #

HasNegation Int8 Source # 

Methods

negate :: Int8 -> Int8 Source #

HasNegation Int16 Source # 

Methods

negate :: Int16 -> Int16 Source #

HasNegation Int32 Source # 

Methods

negate :: Int32 -> Int32 Source #

HasNegation Int64 Source # 

Methods

negate :: Int64 -> Int64 Source #

HasNegation Integer Source # 
HasNegation Word Source # 

Methods

negate :: Word -> Word Source #

HasNegation Word8 Source # 

Methods

negate :: Word8 -> Word8 Source #

HasNegation Word16 Source # 

Methods

negate :: Word16 -> Word16 Source #

HasNegation Word32 Source # 

Methods

negate :: Word32 -> Word32 Source #

HasNegation Word64 Source # 

Methods

negate :: Word64 -> Word64 Source #

HasNegation CChar Source # 

Methods

negate :: CChar -> CChar Source #

HasNegation CSChar Source # 

Methods

negate :: CSChar -> CSChar Source #

HasNegation CShort Source # 

Methods

negate :: CShort -> CShort Source #

HasNegation CInt Source # 

Methods

negate :: CInt -> CInt Source #

HasNegation CLong Source # 

Methods

negate :: CLong -> CLong Source #

HasNegation CLLong Source # 

Methods

negate :: CLLong -> CLLong Source #

HasNegation CFloat Source # 

Methods

negate :: CFloat -> CFloat Source #

HasNegation CDouble Source # 
HasNegation CPtrdiff Source # 
HasNegation CWchar Source # 

Methods

negate :: CWchar -> CWchar Source #

HasNegation CIntMax Source # 
HasNegation Word128 Source # 
HasNegation Word256 Source #