haskus-binary-0.6.0.0: Haskus binary format manipulation

Safe HaskellSafe
LanguageHaskell2010

Haskus.Format.Binary.Layout

Description

Memory layout

Describe a memory region

Synopsis

Documentation

type family LayoutPathType l p :: * Source #

Type obtained when following path p

Instances

type LayoutPathType l (LayoutPath ([] *)) Source # 
type LayoutPathType l (LayoutPath ([] *)) = l

type family LayoutPathOffset l p :: Nat Source #

Offset obtained when following path p

Instances

type LayoutPathOffset e (LayoutPath ([] *)) Source # 
type LayoutPathOffset e (LayoutPath ([] *)) = 0

data LayoutPath path Source #

Path in a layout

Constructors

LayoutPath 

Instances

type LayoutPathOffset e (LayoutPath ([] *)) Source # 
type LayoutPathOffset e (LayoutPath ([] *)) = 0
type LayoutPathType l (LayoutPath ([] *)) Source # 
type LayoutPathType l (LayoutPath ([] *)) = l

data LayoutIndex n Source #

Index in a layout path

Constructors

LayoutIndex 

data LayoutSymbol s Source #

Symbol in a layout path

Constructors

LayoutSymbol 

layoutIndex :: forall n. LayoutPath '[LayoutIndex n] Source #

Index in the layout path

layoutSymbol :: forall s. LayoutPath '[LayoutSymbol s] Source #

Symbol in the layout path

type family p :-> (s :: Symbol) where ... Source #

Equations

(LayoutPath xs) :-> s = LayoutPath (Snoc xs (LayoutSymbol s)) 

type family p :#> (n :: Nat) where ... Source #

Equations

(LayoutPath xs) :#> n = LayoutPath (Snoc xs (LayoutIndex n))