basement-0.0.16: Foundation scrap box of array & string
LicenseBSD-style
MaintainerVincent Hanquez <vincent@snarc.org>
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Basement.Compat.Primitive

Description

 
Synopsis

Documentation

bool# :: Int# -> Bool Source #

turn an Int# into a Bool

data PinnedStatus Source #

Flag record whether a specific byte array is pinned or not

Constructors

Pinned 
Unpinned 

Instances

Instances details
Eq PinnedStatus Source # 
Instance details

Defined in Basement.Compat.Primitive

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# :: o -> b -> c -> State# RealWorld -> ( RealWorld, Weak# b#) * 0.5 :mkWeak# :: o -> b -> (State# RealWorld -> ( RealWorld, c#)) -> State# RealWorld -> ( RealWorld, Weak# b#)

unsafeCoerce# :: forall (q :: RuntimeRep) (r :: RuntimeRep) (a :: TYPE q) (b :: TYPE r). a -> b #

Highly, terribly dangerous coercion from one representation type to another. Misuse of this function can invite the garbage collector to trounce upon your data and then laugh in your face. You don't want this function. Really.

data Word #

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

Constructors

W# Word# 

Instances

Instances details
Data Word

Since: base-4.0.0.0

Instance details

Defined in Data.Data

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 :: forall r r'. (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 #

Storable Word

Since: base-2.1

Instance details

Defined in Foreign.Storable

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: base-2.1

Instance details

Defined in GHC.Bits

FiniteBits Word

Since: base-4.6.0.0

Instance details

Defined in GHC.Bits

Bounded Word

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Word

Since: base-2.1

Instance details

Defined in GHC.Enum

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] #

Num Word

Since: base-2.1

Instance details

Defined in GHC.Num

Methods

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

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

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

negate :: Word -> Word #

abs :: Word -> Word #

signum :: Word -> Word #

fromInteger :: Integer -> Word #

Read Word

Since: base-4.5.0.0

Instance details

Defined in GHC.Read

Integral Word

Since: base-2.1

Instance details

Defined in GHC.Real

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 #

Real Word

Since: base-2.1

Instance details

Defined in GHC.Real

Methods

toRational :: Word -> Rational #

Show Word

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> Word -> ShowS #

show :: Word -> String #

showList :: [Word] -> ShowS #

BitOps Word Source # 
Instance details

Defined in Basement.Bits

FiniteBitsOps Word Source # 
Instance details

Defined in Basement.Bits

HasNegation Word Source # 
Instance details

Defined in Basement.Compat.NumLiteral

Methods

negate :: Word -> Word Source #

Integral Word Source # 
Instance details

Defined in Basement.Compat.NumLiteral

NormalForm Word Source # 
Instance details

Defined in Basement.NormalForm

Methods

toNormalForm :: Word -> () Source #

Additive Word Source # 
Instance details

Defined in Basement.Numerical.Additive

Methods

azero :: Word Source #

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

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

IDivisible Word Source # 
Instance details

Defined in Basement.Numerical.Multiplicative

Methods

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

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

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

Multiplicative Word Source # 
Instance details

Defined in Basement.Numerical.Multiplicative

Methods

midentity :: Word Source #

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

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

IsIntegral Word Source # 
Instance details

Defined in Basement.Numerical.Number

IsNatural Word Source # 
Instance details

Defined in Basement.Numerical.Number

Subtractive Word Source # 
Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference Word Source #

Methods

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

PrimMemoryComparable Word Source # 
Instance details

Defined in Basement.PrimType

PrimType Word Source # 
Instance details

Defined in Basement.PrimType

Associated Types

type PrimSize Word :: Nat Source #

Eq Word 
Instance details

Defined in GHC.Classes

Methods

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

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

Ord Word 
Instance details

Defined in GHC.Classes

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 #

Cast Int64 Word Source # 
Instance details

Defined in Basement.Cast

Methods

cast :: Int64 -> Word Source #

Cast Word64 Word Source # 
Instance details

Defined in Basement.Cast

Methods

cast :: Word64 -> Word Source #

Cast Int Word Source # 
Instance details

Defined in Basement.Cast

Methods

cast :: Int -> Word Source #

Cast Word Int64 Source # 
Instance details

Defined in Basement.Cast

Methods

cast :: Word -> Int64 Source #

Cast Word Word64 Source # 
Instance details

Defined in Basement.Cast

Methods

cast :: Word -> Word64 Source #

Cast Word Int Source # 
Instance details

Defined in Basement.Cast

Methods

cast :: Word -> Int Source #

From Word16 Word Source # 
Instance details

Defined in Basement.From

Methods

from :: Word16 -> Word Source #

From Word32 Word Source # 
Instance details

Defined in Basement.From

Methods

from :: Word32 -> Word Source #

From Word8 Word Source # 
Instance details

Defined in Basement.From

Methods

from :: Word8 -> Word Source #

From Word Word64 Source # 
Instance details

Defined in Basement.From

Methods

from :: Word -> Word64 Source #

IntegralDownsize Word Word16 Source # 
Instance details

Defined in Basement.IntegralConv

IntegralDownsize Word Word32 Source # 
Instance details

Defined in Basement.IntegralConv

IntegralDownsize Word Word8 Source # 
Instance details

Defined in Basement.IntegralConv

IntegralUpsize Word16 Word Source # 
Instance details

Defined in Basement.IntegralConv

IntegralUpsize Word32 Word Source # 
Instance details

Defined in Basement.IntegralConv

IntegralUpsize Word8 Word Source # 
Instance details

Defined in Basement.IntegralConv

IntegralUpsize Word Word64 Source # 
Instance details

Defined in Basement.IntegralConv

From Word (CountOf ty) Source # 
Instance details

Defined in Basement.From

Methods

from :: Word -> CountOf ty Source #

From Word (Offset ty) Source # 
Instance details

Defined in Basement.From

Methods

from :: Word -> Offset ty Source #

Generic1 (URec Word :: k -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (URec Word) :: k -> Type #

Methods

from1 :: forall (a :: k0). URec Word a -> Rep1 (URec Word) a #

to1 :: forall (a :: k0). Rep1 (URec Word) a -> URec Word a #

Foldable (UWord :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => UWord m -> m #

foldMap :: Monoid m => (a -> m) -> UWord a -> m #

foldMap' :: Monoid m => (a -> m) -> UWord a -> m #

foldr :: (a -> b -> b) -> b -> UWord a -> b #

foldr' :: (a -> b -> b) -> b -> UWord a -> b #

foldl :: (b -> a -> b) -> b -> UWord a -> b #

foldl' :: (b -> a -> b) -> b -> UWord a -> b #

foldr1 :: (a -> a -> a) -> UWord a -> a #

foldl1 :: (a -> a -> a) -> UWord a -> a #

toList :: UWord a -> [a] #

null :: UWord a -> Bool #

length :: UWord a -> Int #

elem :: Eq a => a -> UWord a -> Bool #

maximum :: Ord a => UWord a -> a #

minimum :: Ord a => UWord a -> a #

sum :: Num a => UWord a -> a #

product :: Num a => UWord a -> a #

Traversable (UWord :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UWord a -> f (UWord b) #

sequenceA :: Applicative f => UWord (f a) -> f (UWord a) #

mapM :: Monad m => (a -> m b) -> UWord a -> m (UWord b) #

sequence :: Monad m => UWord (m a) -> m (UWord a) #

From (CountOf ty) Word Source # 
Instance details

Defined in Basement.From

Methods

from :: CountOf ty -> Word Source #

Functor (URec Word :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

Generic (URec Word p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Word p) :: Type -> Type #

Methods

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

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

Show (URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

show :: URec Word p -> String #

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

Eq (URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

Ord (URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

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

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

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

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

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

type NatNumMaxBound Word Source # 
Instance details

Defined in Basement.Nat

type Difference Word Source # 
Instance details

Defined in Basement.Numerical.Subtractive

type PrimSize Word Source # 
Instance details

Defined in Basement.PrimType

type PrimSize Word = 8
data URec Word (p :: k)

Used for marking occurrences of Word#

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

data URec Word (p :: k) = UWord {}
type Rep1 (URec Word :: k -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

type Rep1 (URec Word :: k -> Type) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UWord" 'PrefixI 'True) (S1 ('MetaSel ('Just "uWord#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UWord :: k -> Type)))
type Rep (URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

type Rep (URec Word p) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UWord" 'PrefixI 'True) (S1 ('MetaSel ('Just "uWord#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UWord :: Type -> Type)))

data Int8# :: TYPE 'Int8Rep #