vext-0.1.4.0: src-prim-indef/Element.hsig
{-# language DataKinds #-}
{-# language KindSignatures #-}
{-# language MagicHash #-}
{-# language RankNTypes #-}
{-# language UnboxedTuples #-}
{-# language TypeFamilies #-}
{-# language StandaloneKindSignatures #-}
signature Element where
import Data.Unlifted (PrimArray#(..),MutablePrimArray#(..))
import Data.Kind (Type)
import GHC.Exts (TYPE,RuntimeRep(BoxedRep),Levity(Unlifted),State#,Int#)
import Rep (R)
type A# :: TYPE R -> TYPE ('BoxedRep 'Unlifted)
type A# = PrimArray#
type M# :: Type -> TYPE R -> TYPE ('BoxedRep 'Unlifted)
type M# = MutablePrimArray#
size :: Int
unsafeFreeze# :: forall (s :: Type) (a :: TYPE R).
M# s a
-> State# s
-> (# State# s, A# a #)
freeze# :: forall (s :: Type) (a :: TYPE R).
M# s a
-> Int# -- offset
-> Int# -- length
-> State# s
-> (# State# s, A# a #)
-- This is a shrink-and-freeze operation
unsafeShrinkFreeze# :: forall (s :: Type) (a :: TYPE R).
M# s a
-> Int#
-> State# s
-> (# State# s, A# a #)
-- Length of zero. Does not require an element. Reallocates
-- every time.
empty# :: forall (a :: TYPE R). (# #) -> A# a
initialized# :: forall (s :: Type) (a :: TYPE R).
Int#
-> a
-> State# s
-> (# State# s, M# s a #)
index# :: forall (a :: TYPE R).
A# a
-> Int#
-> a
write# :: forall (s :: Type) (a :: TYPE R).
M# s a
-> Int#
-> a
-> State# s
-> State# s
read# :: forall (s :: Type) (a :: TYPE R).
M# s a
-> Int#
-> State# s
-> (# State# s, a #)
set# :: forall (s :: Type) (a :: TYPE R).
M# s a
-> Int#
-> Int#
-> a
-> State# s
-> State# s
copy# :: forall (s :: Type) (a :: TYPE R).
M# s a
-> Int#
-> A# a
-> Int#
-> Int#
-> State# s
-> State# s
thaw# :: forall (s :: Type) (a :: TYPE R).
A# a
-> Int#
-> Int#
-> State# s
-> (# State# s, M# s a #)