Modulevector-0.13.2.0
Data.Vector.Storable
Synopsis
- value convert
- value !
- value !?
- value ++
- value //
- value accum
- value accumulate_
- value all
- value and
- value any
- value backpermute
- value break
- value breakR
- value cmpBy
- value concat
- value concatMap
- value cons
- value constructN
- value constructrN
- value copy
- value create
- value createT
- value drop
- value dropWhile
- value elem
- value elemIndex
- value elemIndices
- value empty
- value enumFromN
- value enumFromStepN
- value enumFromThenTo
- value enumFromTo
- value eqBy
- value filter
- value filterM
- value find
- value findIndex
- value findIndexR
- value findIndices
- value fold1M
- value fold1M'
- value fold1M'_
- value fold1M_
- value foldM
- value foldM'
- value foldM'_
- value foldM_
- value foldMap
- value foldMap'
- value foldl
- value foldl'
- value foldl1
- value foldl1'
- value foldr
- value foldr'
- value foldr1
- value foldr1'
- value forM
- value forM_
- value force
- value freeze
- value fromList
- value fromListN
- value generate
- value generateM
- value group
- value groupBy
- value head
- value headM
- value ifilter
- value ifoldM
- value ifoldM'
- value ifoldM'_
- value ifoldM_
- value ifoldl
- value ifoldl'
- value ifoldr
- value ifoldr'
- value iforM
- value iforM_
- value imap
- value imapM
- value imapM_
- value imapMaybe
- value imapMaybeM
- value indexM
- value init
- value isSameVector
- value iscanl
- value iscanl'
- value iscanr
- value iscanr'
- value iterateN
- value iterateNM
- value izipWith
- value izipWith3
- value izipWith4
- value izipWith5
- value izipWith6
- value izipWithM
- value izipWithM_
- value last
- value lastM
- value length
- value map
- value mapM
- value mapM_
- value mapMaybe
- value mapMaybeM
- value maxIndex
- value maxIndexBy
- value maximum
- value maximumBy
- value maximumOn
- value minIndex
- value minIndexBy
- value minimum
- value minimumBy
- value minimumOn
- value modify
- value notElem
- value null
- value or
- value partition
- value partitionWith
- value postscanl
- value postscanl'
- value postscanr
- value postscanr'
- value prescanl
- value prescanl'
- value prescanr
- value prescanr'
- value product
- value replicate
- value replicateM
- value reverse
- value scanl
- value scanl'
- value scanl1
- value scanl1'
- value scanr
- value scanr'
- value scanr1
- value scanr1'
- value singleton
- value slice
- value snoc
- value span
- value spanR
- value splitAt
- value sum
- value tail
- value take
- value takeWhile
- value thaw
- value toList
- value uncons
- value unfoldr
- value unfoldrExactN
- value unfoldrExactNM
- value unfoldrM
- value unfoldrN
- value unfoldrNM
- value uniq
- value unsafeAccum
- value unsafeAccumulate_
- value unsafeBackpermute
- value unsafeCast
- value unsafeCoerceVector
- value unsafeCopy
- value unsafeDrop
- value unsafeFreeze
- value unsafeFromForeignPtr
- value unsafeFromForeignPtr0
- value unsafeHead
- value unsafeHeadM
- value unsafeIndex
- value unsafeIndexM
- value unsafeInit
- value unsafeLast
- value unsafeLastM
- value unsafeSlice
- value unsafeTail
- value unsafeTake
- value unsafeThaw
- value unsafeToForeignPtr
- value unsafeToForeignPtr0
- value unsafeUpd
- value unsafeUpdate_
- value unsafeWith
- value unsnoc
- value unstablePartition
- value update_
- value zipWith
- value zipWith3
- value zipWith4
- value zipWith5
- value zipWith6
- value zipWithM
- value zipWithM_
- class Storable
- data Vector
- data MVector
- Packagevector-0.13.2.0
- Exports204
- LicenceBSD-3-Clause
- SourceStorable.hs
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.
Instances82Storable, …
Storable EventDefined in ghc-internal-10.0.0 · GHC.Internal.Event.PollStorable PollFdDefined in ghc-internal-10.0.0 · GHC.Internal.Event.PollStorable FingerprintDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.StorableStorable CBoolDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesStorable CCharDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesStorable CClockDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesStorable CDoubleDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesStorable CFloatDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesStorable CIntDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesStorable CIntMaxDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesStorable CIntPtrDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesStorable CLLongDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesStorable CLongDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesStorable CPtrdiffDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesStorable CSCharDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesStorable CSUSecondsDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesStorable CShortDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesStorable CSigAtomicDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesStorable CSizeDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesStorable CTimeDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesStorable CUCharDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesStorable CUIntDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesStorable CUIntMaxDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesStorable CUIntPtrDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesStorable CULLongDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesStorable CULongDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesStorable CUSecondsDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesStorable CUShortDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesStorable CWcharDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesStorable IntPtrDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.PtrStorable WordPtrDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.PtrStorable HalfWordDefined in ghc-internal-10.0.0 · GHC.Internal.Heap.InfoTable.TypesStorable FLockDefined in ghc-internal-10.0.0 · GHC.Internal.IO.Handle.Lock.LinuxOFDStorable Int16Defined in ghc-internal-10.0.0 · GHC.Internal.Foreign.StorableStorable Int32Defined in ghc-internal-10.0.0 · GHC.Internal.Foreign.StorableStorable Int64Defined in ghc-internal-10.0.0 · GHC.Internal.Foreign.StorableStorable Int8Defined in ghc-internal-10.0.0 · GHC.Internal.Foreign.StorableStorable CBlkCntDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesStorable CBlkSizeDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesStorable CCcDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesStorable CClockIdDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesStorable CDevDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesStorable CFsBlkCntDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesStorable CFsFilCntDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesStorable CGidDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesStorable CIdDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesStorable CInoDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesStorable CKeyDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesStorable CModeDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesStorable CNfdsDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesStorable CNlinkDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesStorable COffDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesStorable CPidDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesStorable CRLimDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesStorable CSocklenDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesStorable CSpeedDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesStorable CSsizeDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesStorable CTcflagDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesStorable CTimerDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesStorable CUidDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesStorable FdDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesStorable BoolDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.StorableStorable CharDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.StorableStorable DoubleDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.StorableStorable FloatDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.StorableStorable IntDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.StorableStorable WordDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.StorableStorable Word16Defined in ghc-internal-10.0.0 · GHC.Internal.Foreign.StorableStorable Word32Defined in ghc-internal-10.0.0 · GHC.Internal.Foreign.StorableStorable Word64Defined in ghc-internal-10.0.0 · GHC.Internal.Foreign.StorableStorable Word8Defined in ghc-internal-10.0.0 · GHC.Internal.Foreign.StorableStorable ()Defined in ghc-internal-10.0.0 · GHC.Internal.Foreign.StorableStorable (ConstPtr a)Defined in ghc-internal-10.0.0 · GHC.Internal.Foreign.StorableStorable (FunPtr a)Defined in ghc-internal-10.0.0 · GHC.Internal.Foreign.StorableStorable (Ptr a)Defined in ghc-internal-10.0.0 · GHC.Internal.Foreign.StorableStorable (StablePtr a)Defined in ghc-internal-10.0.0 · GHC.Internal.Foreign.StorableStorable a => Storable (Complex a)Defined in base-4.23.0.0 · Data.ComplexStorable a => Storable (Identity a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.IdentityStorable a => Storable (Down a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.OrdPrim 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-10.0.0 · GHC.Internal.Foreign.StorableStorable a => Storable (Const a b)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.Const
Instances13NFData1, Vector, IsList, Eq, Data, Ord, …
NFData1 VectorDefined in vector-0.13.2.0 · Data.Vector.StorableStorable a => Vector Vector aDefined in vector-0.13.2.0 · Data.Vector.StorableStorable a => IsList (Vector a)Defined in vector-0.13.2.0 · Data.Vector.Storable(Storable a, Eq a) => Eq (Vector a)Defined in vector-0.13.2.0 · Data.Vector.Storable(Data a, Storable a) => Data (Vector a)Defined in vector-0.13.2.0 · Data.Vector.Storable(Storable a, Ord a) => Ord (Vector a)Defined in vector-0.13.2.0 · Data.Vector.Storable(Read a, Storable a) => Read (Vector a)Defined in vector-0.13.2.0 · Data.Vector.Storable(Show a, Storable a) => Show (Vector a)Defined in vector-0.13.2.0 · Data.Vector.StorableStorable a => Semigroup (Vector a)Defined in vector-0.13.2.0 · Data.Vector.StorableStorable a => Monoid (Vector a)Defined in vector-0.13.2.0 · Data.Vector.StorableNFData (Vector a)Defined in vector-0.13.2.0 · Data.Vector.Storabletype Item (Vector a) = aDefined in vector-0.13.2.0 · Data.Vector.Storabletype Mutable Vector = MVectorDefined in vector-0.13.2.0 · Data.Vector.Storable
Constructors
MVector !Int !(ForeignPtr a)