imperative-edsl-0.5: Deep embedding of imperative programs with code generation

Safe HaskellNone
LanguageHaskell2010

Language.Embedded.Imperative.Frontend.General

Description

Exports the general parts of imperative front ends. The motivation for this module is to support making specialized front ends (e.g. like Language.Embedded.Imperative.Frontend but for a specific instruction set). These exports are the parts of the front end that are independent of the instruction set and/or expression language.

Synopsis

Documentation

data Ref a Source

Mutable reference

Instances

data Arr i a Source

Mutable array

Instances

data IArr i a Source

Immutable array

Instances

data Border i Source

Constructors

Incl i 
Excl i 

Instances

Functor Border Source 
Foldable Border Source 
Traversable Border Source 
Eq i => Eq (Border i) Source 
Num i => Num (Border i) Source

fromInteger gives an inclusive border. No other methods defined.

Show i => Show (Border i) Source 

type IxRange i = (i, Int, Border i) Source

Index range

(lo,step,hi)

lo gives the start index; step gives the step length; hi gives the stop index which may be inclusive or exclusive.

class ToIdent a => IsPointer a Source

Types that are represented as a pointers in C

Minimal complete definition

runSwapPtr

Instances

data Handle Source

File handle

Instances

stdin :: Handle Source

Handle to stdin

stdout :: Handle Source

Handle to stdout

data PrintfArg exp Source

data Ptr a Source

Pointer

Instances

data FunArg exp pred where Source

Constructors

ValArg :: pred a => exp a -> FunArg exp pred 
AddrArg :: FunArg exp pred -> FunArg exp pred 
DerefArg :: FunArg exp pred -> FunArg exp pred 
FunArg :: Arg arg pred => arg pred -> FunArg exp pred 

Instances

CompExp exp => Arg (* -> Constraint) (FunArg * exp) CType Source