basement-0.0.6: Foundation scrap box of array & string

LicenseBSD-style
MaintainerVincent Hanquez <vincent@snarc.org>
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Basement.Compat.Primitive

Description

 

Synopsis

Documentation

bool# :: Int# -> Bool Source #

turn an Int# into a Bool

Since GHC 7.8, boolean primitive don't return Bool but Int#.

data PinnedStatus Source #

Flag record whether a specific byte array is pinned or not

Constructors

Pinned 
Unpinned 

compatAndI# :: Int# -> Int# -> Int# Source #

A version friendly of andI#

compatQuotRemInt# :: Int# -> Int# -> (#Int#, Int##) Source #

A version friendly of quotRemInt#

compatCopyAddrToByteArray# :: Addr# -> MutableByteArray# s -> Int# -> Int# -> State# s -> State# s Source #

A version friendly fo copyAddrToByteArray#

only available from GHC 7.8

compatCopyByteArrayToAddr# :: ByteArray# -> Int# -> Addr# -> Int# -> State# s -> State# s Source #

A version friendly fo copyByteArrayToAddr#

only available from GHC 7.8

compatMkWeak# :: o -> b -> IO () -> State# RealWorld -> (#State# RealWorld, Weak# b#) Source #

A mkWeak# version that keep working on 8.0

signature change in ghc-prim: * 0.4: mkWeak RealWorld -> ( RealWorld, Weak) * 0.5 :mkWeak RealWorld -> ( RealWorld, c RealWorld -> ( RealWorld, Weak)

data Word :: * #

A Word is an unsigned integral type, with the same size as Int.

Constructors

W# Word# 

Instances

Bounded Word

Since: 2.1

Enum Word

Since: 2.1

Methods

succ :: Word -> Word #

pred :: Word -> Word #

toEnum :: Int -> Word #

fromEnum :: Word -> Int #

enumFrom :: Word -> [Word] #

enumFromThen :: Word -> Word -> [Word] #

enumFromTo :: Word -> Word -> [Word] #

enumFromThenTo :: Word -> Word -> Word -> [Word] #

Eq Word 

Methods

(==) :: Word -> Word -> Bool #

(/=) :: Word -> Word -> Bool #

Integral Word

Since: 2.1

Methods

quot :: Word -> Word -> Word #

rem :: Word -> Word -> Word #

div :: Word -> Word -> Word #

mod :: Word -> Word -> Word #

quotRem :: Word -> Word -> (Word, Word) #

divMod :: Word -> Word -> (Word, Word) #

toInteger :: Word -> Integer #

Data Word

Since: 4.0.0.0

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Word -> c Word #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Word #

toConstr :: Word -> Constr #

dataTypeOf :: Word -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Word) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Word) #

gmapT :: (forall b. Data b => b -> b) -> Word -> Word #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Word -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Word -> r #

gmapQ :: (forall d. Data d => d -> u) -> Word -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Word -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Word -> m Word #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Word -> m Word #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Word -> m Word #

Num Word

Since: 2.1

Methods

(+) :: Word -> Word -> Word #

(-) :: Word -> Word -> Word #

(*) :: Word -> Word -> Word #

negate :: Word -> Word #

abs :: Word -> Word #

signum :: Word -> Word #

fromInteger :: Integer -> Word #

Ord Word 

Methods

compare :: Word -> Word -> Ordering #

(<) :: Word -> Word -> Bool #

(<=) :: Word -> Word -> Bool #

(>) :: Word -> Word -> Bool #

(>=) :: Word -> Word -> Bool #

max :: Word -> Word -> Word #

min :: Word -> Word -> Word #

Read Word

Since: 4.5.0.0

Real Word

Since: 2.1

Methods

toRational :: Word -> Rational #

Show Word

Since: 2.1

Methods

showsPrec :: Int -> Word -> ShowS #

show :: Word -> String #

showList :: [Word] -> ShowS #

Storable Word

Since: 2.1

Methods

sizeOf :: Word -> Int #

alignment :: Word -> Int #

peekElemOff :: Ptr Word -> Int -> IO Word #

pokeElemOff :: Ptr Word -> Int -> Word -> IO () #

peekByteOff :: Ptr b -> Int -> IO Word #

pokeByteOff :: Ptr b -> Int -> Word -> IO () #

peek :: Ptr Word -> IO Word #

poke :: Ptr Word -> Word -> IO () #

Bits Word

Since: 2.1

FiniteBits Word

Since: 4.6.0.0

HasNegation Word Source # 

Methods

negate :: Word -> Word Source #

Integral Word Source # 
IsNatural Word Source # 
IsIntegral Word Source # 
Subtractive Word Source # 

Associated Types

type Difference Word :: * Source #

Methods

(-) :: Word -> Word -> Difference Word Source #

Additive Word Source # 

Methods

azero :: Word Source #

(+) :: Word -> Word -> Word Source #

scale :: IsNatural n => n -> Word -> Word Source #

IDivisible Word Source # 

Methods

div :: Word -> Word -> Word Source #

mod :: Word -> Word -> Word Source #

divMod :: Word -> Word -> (Word, Word) Source #

Multiplicative Word Source # 

Methods

midentity :: Word Source #

(*) :: Word -> Word -> Word Source #

(^) :: (IsNatural n, IDivisible n) => Word -> n -> Word Source #

PrimMemoryComparable Word Source # 
PrimType Word Source # 
NormalForm Word Source # 

Methods

toNormalForm :: Word -> () Source #

IntegralUpsize Word Word64 Source # 
IntegralUpsize Word8 Word Source # 
IntegralUpsize Word16 Word Source # 
IntegralUpsize Word32 Word Source # 
IntegralDownsize Word Word8 Source # 
IntegralDownsize Word Word16 Source # 
IntegralDownsize Word Word32 Source # 
Cast Int Word Source # 

Methods

cast :: Int -> Word Source #

Cast Int64 Word Source # 

Methods

cast :: Int64 -> Word Source #

Cast Word Int Source # 

Methods

cast :: Word -> Int Source #

Cast Word Int64 Source # 

Methods

cast :: Word -> Int64 Source #

Cast Word Word64 Source # 

Methods

cast :: Word -> Word64 Source #

Cast Word64 Word Source # 

Methods

cast :: Word64 -> Word Source #

From Word Word64 Source # 

Methods

from :: Word -> Word64 Source #

From Word8 Word Source # 

Methods

from :: Word8 -> Word Source #

From Word16 Word Source # 

Methods

from :: Word16 -> Word Source #

From Word32 Word Source # 

Methods

from :: Word32 -> Word Source #

From Word (CountOf ty) Source # 

Methods

from :: Word -> CountOf ty Source #

From Word (Offset ty) Source # 

Methods

from :: Word -> Offset ty Source #

Generic1 k (URec k Word) 

Associated Types

type Rep1 (URec k Word) (f :: URec k Word -> *) :: k -> * #

Methods

from1 :: f a -> Rep1 (URec k Word) f a #

to1 :: Rep1 (URec k Word) f a -> f a #

From (CountOf ty) Word Source # 

Methods

from :: CountOf ty -> Word Source #

Functor (URec * Word) 

Methods

fmap :: (a -> b) -> URec * Word a -> URec * Word b #

(<$) :: a -> URec * Word b -> URec * Word a #

Foldable (URec * Word) 

Methods

fold :: Monoid m => URec * Word m -> m #

foldMap :: Monoid m => (a -> m) -> URec * Word a -> m #

foldr :: (a -> b -> b) -> b -> URec * Word a -> b #

foldr' :: (a -> b -> b) -> b -> URec * Word a -> b #

foldl :: (b -> a -> b) -> b -> URec * Word a -> b #

foldl' :: (b -> a -> b) -> b -> URec * Word a -> b #

foldr1 :: (a -> a -> a) -> URec * Word a -> a #

foldl1 :: (a -> a -> a) -> URec * Word a -> a #

toList :: URec * Word a -> [a] #

null :: URec * Word a -> Bool #

length :: URec * Word a -> Int #

elem :: Eq a => a -> URec * Word a -> Bool #

maximum :: Ord a => URec * Word a -> a #

minimum :: Ord a => URec * Word a -> a #

sum :: Num a => URec * Word a -> a #

product :: Num a => URec * Word a -> a #

Traversable (URec * Word) 

Methods

traverse :: Applicative f => (a -> f b) -> URec * Word a -> f (URec * Word b) #

sequenceA :: Applicative f => URec * Word (f a) -> f (URec * Word a) #

mapM :: Monad m => (a -> m b) -> URec * Word a -> m (URec * Word b) #

sequence :: Monad m => URec * Word (m a) -> m (URec * Word a) #

Eq (URec k Word p) 

Methods

(==) :: URec k Word p -> URec k Word p -> Bool #

(/=) :: URec k Word p -> URec k Word p -> Bool #

Ord (URec k Word p) 

Methods

compare :: URec k Word p -> URec k Word p -> Ordering #

(<) :: URec k Word p -> URec k Word p -> Bool #

(<=) :: URec k Word p -> URec k Word p -> Bool #

(>) :: URec k Word p -> URec k Word p -> Bool #

(>=) :: URec k Word p -> URec k Word p -> Bool #

max :: URec k Word p -> URec k Word p -> URec k Word p #

min :: URec k Word p -> URec k Word p -> URec k Word p #

Show (URec k Word p) 

Methods

showsPrec :: Int -> URec k Word p -> ShowS #

show :: URec k Word p -> String #

showList :: [URec k Word p] -> ShowS #

Generic (URec k Word p) 

Associated Types

type Rep (URec k Word p) :: * -> * #

Methods

from :: URec k Word p -> Rep (URec k Word p) x #

to :: Rep (URec k Word p) x -> URec k Word p #

type NatNumMaxBound Word Source # 
type Difference Word Source # 
type PrimSize Word Source # 
type PrimSize Word = 8
data URec k Word

Used for marking occurrences of Word#

Since: 4.9.0.0

data URec k Word = UWord {}
type Rep1 k (URec k Word) 
type Rep1 k (URec k Word) = D1 k (MetaData "URec" "GHC.Generics" "base" False) (C1 k (MetaCons "UWord" PrefixI True) (S1 k (MetaSel (Just Symbol "uWord#") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (UWord k)))
type Rep (URec k Word p) 
type Rep (URec k Word p) = D1 * (MetaData "URec" "GHC.Generics" "base" False) (C1 * (MetaCons "UWord" PrefixI True) (S1 * (MetaSel (Just Symbol "uWord#") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (UWord *)))