Constructors
Dict :: a => Dict a
:: a typeCtrl KGHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27
Modulelinear-base-0.4.0Haskell2010
Dict :: a => Dict aThis abstract type class represents values natively known to have a GC-less implementation. Basically, these are sequences (represented as tuples) of base types.
storable :: Dict (Storable a)KnownRepresentable IntDefined in linear-base-0.4.0 · Foreign.Marshal.Pure.InternalKnownRepresentable WordDefined in linear-base-0.4.0 · Foreign.Marshal.Pure.InternalKnownRepresentable ()Defined in linear-base-0.4.0 · Foreign.Marshal.Pure.InternalKnownRepresentable (Ptr a)Defined in linear-base-0.4.0 · Foreign.Marshal.Pure.InternalKnownRepresentable (Box a)Defined in linear-base-0.4.0 · Foreign.Marshal.Pure.InternalKnownRepresentable a => KnownRepresentable (Maybe a)Defined in linear-base-0.4.0 · Foreign.Marshal.Pure.InternalKnownRepresentable a => KnownRepresentable (Ur a)Defined in linear-base-0.4.0 · Foreign.Marshal.Pure.Internal(KnownRepresentable a, KnownRepresentable b) => KnownRepresentable (a, b)Defined in linear-base-0.4.0 · Foreign.Marshal.Pure.Internal(KnownRepresentable a, KnownRepresentable b, KnownRepresentable c) => KnownRepresentable (a, b, c)Defined in linear-base-0.4.0 · Foreign.Marshal.Pure.InternalLaws of Representable:
type family AsKnown aRepresentable IntDefined in linear-base-0.4.0 · Foreign.Marshal.Pure.InternalRepresentable WordDefined in linear-base-0.4.0 · Foreign.Marshal.Pure.InternalRepresentable ()Defined in linear-base-0.4.0 · Foreign.Marshal.Pure.InternalRepresentable (Ptr a)Defined in linear-base-0.4.0 · Foreign.Marshal.Pure.InternalRepresentable (Box a)Defined in linear-base-0.4.0 · Foreign.Marshal.Pure.InternalRepresentable a => Representable (Maybe a)Defined in linear-base-0.4.0 · Foreign.Marshal.Pure.Internal(Representable a, Representable b) => Representable (a, b)Defined in linear-base-0.4.0 · Foreign.Marshal.Pure.Internal(Representable a, Representable b, Representable c) => Representable (a, b, c)Defined in linear-base-0.4.0 · Foreign.Marshal.Pure.InternalThis is an easier way to create an instance of Representable. It is a bit abusive to use a type class for this (after all, it almost never makes sense to use this as a constraint). But it works in practice.
To use, define an instance of MkRepresentable myType intermediateType
then declare the following instance:
instance Representable myType where {type AsKnown = AsKnown intermediateType}And the default instance mechanism will create the appropriate Representable instance.
Laws of MkRepresentable:
Consumable PoolDefined in linear-base-0.4.0 · Foreign.Marshal.Pure.InternalDupable PoolDefined in linear-base-0.4.0 · Foreign.Marshal.Pure.InternalGiven a linear computation that manages memory, run that computation.
'Box a' is the abstract type of manually managed data. It can be used as
part of data type definitions in order to store linked data structure off
heap. See Foreign.List and Foreign.Pair in the examples directory of
the source repository.
Storable (Box a)Defined in linear-base-0.4.0 · Foreign.Marshal.Pure.InternalKnownRepresentable (Box a)Defined in linear-base-0.4.0 · Foreign.Marshal.Pure.InternalRepresentable (Box a)Defined in linear-base-0.4.0 · Foreign.Marshal.Pure.Internaltype AsKnown (Box a) = Box aDefined in linear-base-0.4.0 · Foreign.Marshal.Pure.InternalStore a value a on the system heap that is not managed by the GC.
Retrieve the value stored on system heap memory.