HORIZON HASKELLDocslts/ghc-9.14.xd82dee82026-10-12Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · d82dee8 · 2026-10-12

Modulepvar-1.0.0.0Haskell2010

Data.Primitive.PVar

  • 4 types
  • 4 classes
  • 44 values
  • Packagepvar-1.0.0.0
  • Exports52
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceInternal.hs

PVar has significantly better performance characteristics over IORef, STRef and MutVar. This is because value is mutated directly in memory instead of following an extra pointer. Besides better performance there is another consequence of direct mutation, namely the value is always evaluated to normal form when being written into a PVar

datadata PVar a s
#

Mutable variable with primitive value.

Instances2Storable, NFData
  • Prim a => Storable (PVar a RealWorld)Defined in pvar-1.0.0.0 · Data.Primitive.PVar.Internal

    poke+peek will result in a new copy of a PVar

  • NFData (PVar a s)Defined in pvar-1.0.0.0 · Data.Primitive.PVar.Internal

    Values are already written into PVar in NF, this instance is trivial.

Creation

2 declarations
valuenewPVar :: (MonadPrim s m, Prim a) => a -> m (PVar a s)
#

Create a mutable variable in unpinned memory (i.e. GC can move it) with an initial value. This is a prefered way to create a mutable variable, since it will not contribute to memory fragmentation. For pinned memory versions see newPinnedPVar and newAlignedPinnedPVar

valuewithPVarST
  1. :: Prim p
  2. => p

    Initial value assigned to the mutable variable

  3. -> (forall s. PVar p s -> ST s a)

    Action to run

  4. -> a

    Result produced by the ST action

#

Run an ST action on a mutable variable.

Mutable Operations

15 declarations
valuemodifyPVar :: (MonadPrim s m, Prim a) => PVar a s -> (a -> (a, b)) -> m b
#

Apply a pure function to the contents of a mutable variable. Returns the artifact of computation.

valuefetchModifyPVar :: (MonadPrim s m, Prim a) => PVar a s -> (a -> a) -> m a
#

Apply a pure function to the contents of a mutable variable. Returns the old value.

valuemodifyFetchPVar :: (MonadPrim s m, Prim a) => PVar a s -> (a -> a) -> m a
#

Apply a pure function to the contents of a mutable variable. Returns the new value.

valuemodifyPVarM :: (MonadPrim s m, Prim a) => PVar a s -> (a -> m (a, b)) -> m b
#

Apply a monadic action to the contents of a mutable variable. Returns the artifact of computation.

valuefetchModifyPVarM :: (MonadPrim s m, Prim a) => PVar a s -> (a -> m a) -> m a
#

Apply a monadic action to the contents of a mutable variable. Returns the old value.

valuemodifyFetchPVarM :: (MonadPrim s m, Prim a) => PVar a s -> (a -> m a) -> m a
#

Apply a monadic action to the contents of a mutable variable. Returns the new value.

valuesizeOfPVar :: Prim a => PVar a s -> Int
#

Size in bytes of a value stored inside the mutable variable. PVar itself is neither accessed nor evaluated.

valuealignmentPVar :: Prim a => PVar a s -> Int
#

Alignment in bytes of the value stored inside of the mutable variable. PVar itself is neither accessed nor evaluated.

Pinned memory

10 declarations

In theory it is unsafe to mix Storable and Prim operations on the same chunk of memory, because some instances can have different memory layouts for the same type. This is highly uncommon in practice and if you are intermixing the two concepts together you probably already know what you are doing.

valuewithPtrPVar
  1. :: (MonadPrim s m, Prim a)
  2. => PVar a n
  3. -> Ptr a -> m b
  4. -> m (Maybe b)
#

Apply an action to the Ptr that references the mutable variable, but only if it is backed by pinned memory, cause otherwise it would be unsafe.

valuewithStorablePVar
  1. :: (MonadPrim s m, Storable a)
  2. => a

    Initial value

  3. -> (PVar a s -> Ptr a -> m b)

    Action to run

  4. -> m b
#

Apply an action to the newly allocated PVar and to the Ptr that references it. Memory allocated with number of bytes specified by sizeOf a is allocated and pinned, therefore it is safe to operate directly with the pointer as well as over FFI. Returning the pointer from the supplied action would be very unsafe, therefore return the PVar if you still need it afterwards, garbage collector will cleanup the memory when it is no longer needed.

Atomic operations

14 declarations
valueatomicAddIntPVar :: MonadPrim s m => PVar Int s -> Int -> m Int
#

Add two numbers, corresponds to (+) done atomically. Returns the previous value of the mutable variable. Implies a full memory barrier.

valueatomicSubIntPVar :: MonadPrim s m => PVar Int s -> Int -> m Int
#

Subtract two numbers, corresponds to (-) done atomically. Returns the previous value of the mutable variable. Implies a full memory barrier.

valueatomicAndIntPVar :: MonadPrim s m => PVar Int s -> Int -> m Int
#

Binary conjuction (AND), corresponds to (.&.) done atomically. Returns the previous value of the mutable variable. Implies a full memory barrier.

valueatomicOrIntPVar :: MonadPrim s m => PVar Int s -> Int -> m Int
#

Binary disjunction (OR), corresponds to (.|.) done atomically. Returns the previous value of the mutable variable. Implies a full memory barrier.

valueatomicXorIntPVar :: MonadPrim s m => PVar Int s -> Int -> m Int
#

Binary exclusive disjunction (XOR), corresponds to xor done atomically. Returns the previous value of the mutable variable. Implies a full memory barrier.

Re-exports

9 declarations
classclass Prim a where
#

Class of types supporting primitive array operations. This includes interfacing with GC-managed memory (functions suffixed with ByteArray#) and interfacing with unmanaged memory (functions suffixed with Addr#). Endianness is platform-dependent.

Instances77Prim, …
  • Prim CBoolDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CCharDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CClockDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CDoubleDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CFloatDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CIntDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CIntMaxDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CIntPtrDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CLLongDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CLongDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CPtrdiffDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CSCharDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CSUSecondsDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CShortDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CSigAtomicDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CSizeDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CTimeDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CUCharDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CUIntDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CUIntMaxDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CUIntPtrDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CULLongDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CULongDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CUSecondsDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CUShortDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CWcharDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim IntPtrDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim WordPtrDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim Int16Defined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim Int32Defined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim Int64Defined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim Int8Defined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CBlkCntDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CBlkSizeDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CCcDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CClockIdDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CDevDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CFsBlkCntDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CFsFilCntDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CGidDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CIdDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CInoDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CKeyDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CModeDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CNlinkDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim COffDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CPidDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CRLimDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CSpeedDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CSsizeDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CTcflagDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CTimerDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CUidDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim FdDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim CharDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim DoubleDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim FloatDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim IntDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim WordDefined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim Word16Defined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim Word32Defined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim Word64Defined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim Word8Defined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim (FunPtr a)Defined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim (Ptr a)Defined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim (StablePtr a)Defined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim a => Prim (Complex a)Defined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim a => Prim (First a)Defined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim a => Prim (Last a)Defined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim a => Prim (Max a)Defined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim a => Prim (Min a)Defined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim a => Prim (Identity a)Defined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim a => Prim (Down a)Defined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim a => Prim (Dual a)Defined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim a => Prim (Product a)Defined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim a => Prim (Sum a)Defined in primitive-0.9.1.0 · Data.Primitive.Types
  • Prim a => Prim (Const a b)Defined in primitive-0.9.1.0 · Data.Primitive.Types
classclass Monad m => PrimMonad (m :: Type -> Type) where
#

Class of monads which can perform primitive state-transformer actions.

Associated types

Instances18PrimMonad, …
datadata RealWorld
#

RealWorld is deeply magical. It is primitive, but it is not unlifted (hence ptrArg). We never manipulate values of type RealWorld; it's only used in the type system, to parameterise State#.

Instances1Storable
valuesizeOf :: Prim a => a -> Int
#

The size of values of type a in bytes. The argument is not used.

It is recommended to use sizeOfType instead.

This function has existed since 0.1, but was moved from Data.Primitive to Data.Primitive.Types in version 0.6.3.0.

valuealignment :: Prim a => a -> Int
#

The alignment of values of type a in bytes. The argument is not used.

It is recommended to use alignmentOfType instead.

This function has existed since 0.1, but was moved from Data.Primitive to Data.Primitive.Types in version 0.6.3.0.

newtypenewtype ST s a
#

The strict ST monad. The ST monad allows for destructive updates, but is escapable (unlike IO). A computation of type ST s a returns a value of type a, and execute in "thread" s. The s parameter is either

  • an uninstantiated type variable (inside invocations of runST), or

  • RealWorld (inside invocations of stToIO).

It serves to keep the internal states of different invocations of runST separate from each other and from invocations of stToIO.

The >>= and >> operations are strict in the state (though not in values stored in the state). For example,

runST (writeSTRef _|_ v >>= f) = _|_
Instances10Monad, Functor, MonadFix, Applicative, PrimBase, PrimMonad, …
  • Monad (ST s)Defined in ghc-internal-9.1401.0 · GHC.Internal.ST
  • Functor (ST s)Defined in ghc-internal-9.1401.0 · GHC.Internal.ST
  • MonadFix (ST s)Defined in ghc-internal-9.1401.0 · GHC.Internal.Control.Monad.Fix
  • Applicative (ST s)Defined in ghc-internal-9.1401.0 · GHC.Internal.ST
  • PrimBase (ST s)Defined in primitive-0.9.1.0 · Control.Monad.Primitive
  • PrimMonad (ST s)Defined in primitive-0.9.1.0 · Control.Monad.Primitive
  • Show (ST s a)Defined in ghc-internal-9.1401.0 · GHC.Internal.ST
  • Semigroup a => Semigroup (ST s a)Defined in ghc-internal-9.1401.0 · GHC.Internal.ST
  • Monoid a => Monoid (ST s a)Defined in ghc-internal-9.1401.0 · GHC.Internal.ST
  • type PrimState (ST s) = sDefined in primitive-0.9.1.0 · Control.Monad.Primitive
valuerunST :: (forall s. ST s a) -> a
#

Return the value computed by a state thread. The forall ensures that the internal state used by the ST computation is inaccessible to the rest of the program.

classclass Storable a where
#

The member functions of this class facilitate writing values of primitive types to raw memory (which may have been allocated with the above mentioned routines) and reading values from blocks of raw memory. The class, furthermore, includes support for computing the storage requirements and alignment restrictions of storable types.

Memory addresses are represented as values of type Ptr a, for some a which is an instance of class Storable. The type argument to Ptr helps provide some valuable type safety in FFI code (you can't mix pointers of different types without an explicit cast), while helping the Haskell type system figure out which marshalling method is needed for a given pointer.

All marshalling between Haskell and a foreign language ultimately boils down to translating Haskell data structures into the binary representation of a corresponding data structure of the foreign language and vice versa. To code this marshalling in Haskell, it is necessary to manipulate primitive data types stored in unstructured memory blocks. The class Storable facilitates this manipulation on all types for which it is instantiated, which are the standard basic types of Haskell, the fixed size Int types (Int8, Int16, Int32, Int64), the fixed size Word types (Word8, Word16, Word32, Word64), StablePtr, all types from Foreign.C.Types, as well as Ptr.

Methods

  • peek :: Ptr a -> IO a

    Read a value from the given memory location.

    Note that the peek and poke functions might require properly aligned addresses to function correctly. This is architecture dependent; thus, portable code should ensure that when peeking or poking values of some type a, the alignment constraint for a, as given by the function alignment is fulfilled.

  • poke :: Ptr a -> a -> IO ()

    Write the given value to the given memory location. Alignment restrictions might apply; see peek.

Instances84Storable, …
  • Storable EventDefined in ghc-internal-9.1401.0 · GHC.Internal.Event.EPoll
  • Storable EventDefined in ghc-internal-9.1401.0 · GHC.Internal.Event.Poll
  • Storable PollFdDefined in ghc-internal-9.1401.0 · GHC.Internal.Event.Poll
  • Storable FingerprintDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.Storable
  • Storable CBoolDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.Types
  • Storable CCharDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.Types
  • Storable CClockDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.Types
  • Storable CDoubleDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.Types
  • Storable CFloatDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.Types
  • Storable CIntDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.Types
  • Storable CIntMaxDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.Types
  • Storable CIntPtrDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.Types
  • Storable CLLongDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.Types
  • Storable CLongDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.Types
  • Storable CPtrdiffDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.Types
  • Storable CSCharDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.Types
  • Storable CSUSecondsDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.Types
  • Storable CShortDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.Types
  • Storable CSigAtomicDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.Types
  • Storable CSizeDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.Types
  • Storable CTimeDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.Types
  • Storable CUCharDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.Types
  • Storable CUIntDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.Types
  • Storable CUIntMaxDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.Types
  • Storable CUIntPtrDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.Types
  • Storable CULLongDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.Types
  • Storable CULongDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.Types
  • Storable CUSecondsDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.Types
  • Storable CUShortDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.Types
  • Storable CWcharDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.Types
  • Storable IntPtrDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.Ptr
  • Storable WordPtrDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.Ptr
  • Storable HalfWordDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.InfoTable.Types
  • Storable FLockDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.Handle.Lock.LinuxOFD
  • Storable Int16Defined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.Storable
  • Storable Int32Defined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.Storable
  • Storable Int64Defined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.Storable
  • Storable Int8Defined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.Storable
  • Storable CBlkCntDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.Types
  • Storable CBlkSizeDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.Types
  • Storable CCcDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.Types
  • Storable CClockIdDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.Types
  • Storable CDevDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.Types
  • Storable CFsBlkCntDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.Types
  • Storable CFsFilCntDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.Types
  • Storable CGidDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.Types
  • Storable CIdDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.Types
  • Storable CInoDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.Types
  • Storable CKeyDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.Types
  • Storable CModeDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.Types
  • Storable CNfdsDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.Types
  • Storable CNlinkDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.Types
  • Storable COffDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.Types
  • Storable CPidDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.Types
  • Storable CRLimDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.Types
  • Storable CSocklenDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.Types
  • Storable CSpeedDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.Types
  • Storable CSsizeDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.Types
  • Storable CTcflagDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.Types
  • Storable CTimerDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.Types
  • Storable CUidDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.Types
  • Storable FdDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.Types
  • Storable BoolDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.Storable
  • Storable CharDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.Storable
  • Storable DoubleDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.Storable
  • Storable FloatDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.Storable
  • Storable IntDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.Storable
  • Storable WordDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.Storable
  • Storable Word16Defined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.Storable
  • Storable Word32Defined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.Storable
  • Storable Word64Defined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.Storable
  • Storable Word8Defined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.Storable
  • Storable ()Defined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.Storable
  • Storable (ConstPtr a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.Storable
  • Storable (FunPtr a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.Storable
  • Storable (Ptr a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.Storable
  • Storable (StablePtr a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.Storable
  • Storable a => Storable (Complex a)Defined in base-4.22.0.0 · Data.Complex
  • Storable a => Storable (Identity a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Functor.Identity
  • Storable a => Storable (Down a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Ord
  • Prim a => Storable (PrimStorable a)Defined in primitive-0.9.1.0 · Data.Primitive.Types
  • (Storable a, Integral a) => Storable (Ratio a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.Storable
  • Prim a => Storable (PVar a RealWorld)Defined in pvar-1.0.0.0 · Data.Primitive.PVar.Internal

    poke+peek will result in a new copy of a PVar

  • Storable a => Storable (Const a b)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Functor.Const