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

Data.Primitive.Unlifted.Array.Primops

Description

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

Synopsis

Types

Operations

newUnliftedArray# :: forall (a :: UnliftedType) s. Int# -> a -> State# s -> (# State# s, MutableUnliftedArray# s a #) Source #

unsafeNewUnliftedArray# :: forall s (a :: UnliftedType). Int# -> State# s -> (# State# s, MutableUnliftedArray# s a #) Source #

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# :: forall (a :: UnliftedType). (# #) -> UnliftedArray# a Source #

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

readUnliftedArray# :: forall s (a :: UnliftedType). MutableUnliftedArray# s a -> Int# -> State# s -> (# State# s, a #) Source #

casUnliftedArray# :: forall s (a :: UnliftedType). MutableUnliftedArray# s a -> Int# -> a -> a -> State# s -> (# State# s, Int#, a #) Source #