primitive-unlifted-2.1.0.0: Primitive GHC types with unlifted types inside
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Primitive.Unlifted.Array.Primops

Description

Primitive types representing unlifted arrays and the primops for manipulating them.

Synopsis

Types

newtype UnliftedArray# (a :: UnliftedType) #

Constructors

UnliftedArray# (Array# a) 

newtype MutableUnliftedArray# s (a :: UnliftedType) #

Constructors

MutableUnliftedArray# (MutableArray# s a) 

Operations

newUnliftedArray# :: Int# -> a -> State# s -> (# State# s, MutableUnliftedArray# s a #) #

unsafeNewUnliftedArray# :: Int# -> State# s -> (# State# s, MutableUnliftedArray# s a #) #

Create a MutableUnliftedArray# whose entries contain some unspecified static value. This may be more convenient than newUnliftedArray# if there is no value on hand with which to initialize the array. Each entry must be initialized before being read and used. This condition is not checked.

emptyUnliftedArray# :: (# #) -> UnliftedArray# a #

Warning: Applying unsafeThawUnliftedArray# to the array produced by this function will make demons come out of your nose.

readUnliftedArray# :: MutableUnliftedArray# s a -> Int# -> State# s -> (# State# s, a #) #

writeUnliftedArray# :: MutableUnliftedArray# s a -> Int# -> a -> State# s -> State# s #

unsafeFreezeUnliftedArray# :: MutableUnliftedArray# s a -> State# s -> (# State# s, UnliftedArray# a #) #

unsafeThawUnliftedArray# :: UnliftedArray# a -> State# s -> (# State# s, MutableUnliftedArray# s a #) #

copyUnliftedArray# :: UnliftedArray# a -> Int# -> MutableUnliftedArray# s a -> Int# -> Int# -> State# s -> State# s #

copyMutableUnliftedArray# :: MutableUnliftedArray# s a -> Int# -> MutableUnliftedArray# s a -> Int# -> Int# -> State# s -> State# s #

cloneMutableUnliftedArray# :: MutableUnliftedArray# s a -> Int# -> Int# -> State# s -> (# State# s, MutableUnliftedArray# s a #) #

freezeUnliftedArray# :: MutableUnliftedArray# s a -> Int# -> Int# -> State# s -> (# State# s, UnliftedArray# a #) #

thawUnliftedArray# :: UnliftedArray# a -> Int# -> Int# -> State# s -> (# State# s, MutableUnliftedArray# s a #) #

casUnliftedArray# :: MutableUnliftedArray# s a -> Int# -> a -> a -> State# s -> (# State# s, Int#, a #) #