| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Haskus.Memory.Layout
Contents
Description
Memory layout
Describe a memory region
Synopsis
- data LPath (path :: [PathElem]) = LPath
- data PathElem
- lPath :: forall e. LPath '[e]
- type family LPathType p l :: Type
- type family LPathOffset p l :: Nat
- type LRoot = LPath '[]
- type family p :-> (s :: Symbol) where ...
- type family p :#> (n :: Nat) where ...
- data CPrimitive (size :: Nat) (align :: Nat) = CPrimitive
- data CArray (n :: Nat) (a :: k) = CArray
- data CUArray (a :: k) = CUArray
- data CStruct (fs :: [Field]) = CStruct
- data CUnion (fs :: [Field]) = CUnion
Documentation
data LPath (path :: [PathElem]) Source #
Path in a layout
Constructors
| LPath |
Instances
| type LPathOffset (LPath ([] :: [PathElem])) l Source # | |
Defined in Haskus.Memory.Layout | |
| type LPathType (LPath ([] :: [PathElem])) l Source # | |
Defined in Haskus.Memory.Layout | |
Layout path element
Instances
| type LPathOffset (LPath ([] :: [PathElem])) l Source # | |
Defined in Haskus.Memory.Layout | |
| type LPathType (LPath ([] :: [PathElem])) l Source # | |
Defined in Haskus.Memory.Layout | |
type family LPathOffset p l :: Nat Source #
Offset obtained when following path p
Instances
| type LPathOffset (LPath ([] :: [PathElem])) l Source # | |
Defined in Haskus.Memory.Layout | |
Layouts
data CPrimitive (size :: Nat) (align :: Nat) Source #
Primitives
>>>:kind! CSizeOf (CPrimitive 8 1)CSizeOf (CPrimitive 8 1) :: Nat = 8
>>>:kind! CAlignment (CPrimitive 8 2)CAlignment (CPrimitive 8 2) :: Nat = 2
Constructors
| CPrimitive |
data CArray (n :: Nat) (a :: k) Source #
Array
>>>type S = CArray 10 (CPrimitive 8 8)>>>:kind! CSizeOf SCSizeOf S :: Nat = 80
>>>:kind! CAlignment SCAlignment S :: Nat = 8
Constructors
| CArray |
data CUArray (a :: k) Source #
Unbounded array
>>>type S = CUArray (CPrimitive 8 8)>>>:kind! CSizeOf SCSizeOf S :: Nat = (TypeError ...)
>>>:kind! CAlignment SCAlignment S :: Nat = 8
Constructors
| CUArray |