gibbon-0.3: A compiler for operating on serialized data
Safe HaskellSafe-Inferred
LanguageHaskell2010

Gibbon.L4.Syntax

Description

Defines the target language for first-order L1 language with C code generator for it.

Synopsis

Documentation

data Var Source #

Instances

Instances details
Out Var Source # 
Instance details

Defined in Gibbon.Common

Methods

docPrec :: Int -> Var -> Doc Source #

doc :: Var -> Doc Source #

docList :: [Var] -> Doc Source #

IsString Var Source # 
Instance details

Defined in Gibbon.Common

Read Var Source # 
Instance details

Defined in Gibbon.Common

Show Var Source # 
Instance details

Defined in Gibbon.Common

NFData Var Source # 
Instance details

Defined in Gibbon.Common

Methods

rnf :: Var -> () Source #

Eq Var Source # 
Instance details

Defined in Gibbon.Common

Methods

(==) :: Var -> Var -> Bool Source #

(/=) :: Var -> Var -> Bool Source #

Ord Var Source # 
Instance details

Defined in Gibbon.Common

Methods

compare :: Var -> Var -> Ordering Source #

(<) :: Var -> Var -> Bool Source #

(<=) :: Var -> Var -> Bool Source #

(>) :: Var -> Var -> Bool Source #

(>=) :: Var -> Var -> Bool Source #

max :: Var -> Var -> Var Source #

min :: Var -> Var -> Var Source #

FreeVars LocExp Source # 
Instance details

Defined in Gibbon.L2.Syntax

FunctionTy Ty2 Source #

Function types know about locations and traversal effects.

Instance details

Defined in Gibbon.L2.Syntax

Associated Types

type ArrowTy Ty2 Source #

Renamable Var Source # 
Instance details

Defined in Gibbon.Language

Methods

gRename :: Map Var Var -> Var -> Var Source #

Pretty Var Source # 
Instance details

Defined in Gibbon.Pretty

ToIdent Var Source # 
Instance details

Defined in Gibbon.Common

Methods

toIdent :: Var -> SrcLoc -> Id Source #

Interp Store Exp2 Source # 
Instance details

Defined in Gibbon.L2.Interp

InterpProg Store Exp2 Source # 
Instance details

Defined in Gibbon.L2.Interp

InterpExt Store Exp2 (E2Ext LocVar Ty2) Source # 
Instance details

Defined in Gibbon.L2.Interp

Out (ArrowTy2 Ty2) Source # 
Instance details

Defined in Gibbon.L2.Syntax

FreeVars a => FreeVars (TyEnv a) Source # 
Instance details

Defined in Gibbon.L0.Typecheck

Methods

gFreeVars :: TyEnv a -> Set Var Source #

Pretty [Var] Source # 
Instance details

Defined in Gibbon.Pretty

Typeable (PreExp E2Ext LocVar (UrTy LocVar)) Source #

The gRecoverType instance defined in Language.Syntax is incorrect for L2. For the AppE case, it'll just return the type with with the function was defined. However, we want the recovered type to have the locations actually used at the callsites! For example,

add1 :: Tree a -> Tree b add1 = _

... (add1 [loc1, loc2] tr1) ..

in this case, we want the type of (add1 tr1) to be (Tree loc2) and NOT (Tree b). We have to do something similar for variables bound by a pattern match.

Instance details

Defined in Gibbon.L2.Syntax

type ArrowTy Ty2 Source # 
Instance details

Defined in Gibbon.L2.Syntax

type Tag = Word8 Source #

data Tail Source #

Constructors

RetValsT [Triv]

Only in tail position, for returning from a function.

EndOfMain

A marker for an end of the main expression.

AssnValsT

INTERNAL ONLY: used for assigning instead of returning.

Fields

LetCallT 

Fields

LetPrimCallT 

Fields

LetTrivT 

Fields

  • bnd :: (Var, Ty, Triv)
     
  • bod :: Tail

    Unpack a struct pointer (variable of PtrTy) into local fields.

LetIfT 

Fields

LetUnpackT 

Fields

  • binds :: [(Var, Ty)]
     
  • ptr :: Var

    Var pointing to a PtrTy

  • bod :: Tail

    Unpack a struct pointer (variable of PtrTy) into local fields.

LetAllocT 

Fields

  • lhs :: Var

    Var to bind to PtrTy

  • vals :: [(Ty, Triv)]

    Fields of allocated struct

  • bod :: Tail

    Unpack a struct pointer (variable of PtrTy) into local fields.

LetAvailT 

Fields

  • vars :: [Var]
     
  • bod :: Tail

    Unpack a struct pointer (variable of PtrTy) into local fields.

IfT 

Fields

ErrT String 
LetTimedT 

Fields

Switch Label Triv Alts (Maybe Tail)

For casing on numeric tags or integers.

TailCall Var [Triv] 
Goto Label 
LetArenaT 

Fields

  • lhs :: Var

    Var to bind to PtrTy

  • bod :: Tail

    Unpack a struct pointer (variable of PtrTy) into local fields.

Instances

Instances details
Out Tail Source # 
Instance details

Defined in Gibbon.L4.Syntax

Methods

docPrec :: Int -> Tail -> Doc Source #

doc :: Tail -> Doc Source #

docList :: [Tail] -> Doc Source #

Generic Tail Source # 
Instance details

Defined in Gibbon.L4.Syntax

Associated Types

type Rep Tail :: Type -> Type Source #

Methods

from :: Tail -> Rep Tail x Source #

to :: Rep Tail x -> Tail Source #

Show Tail Source # 
Instance details

Defined in Gibbon.L4.Syntax

NFData Tail Source # 
Instance details

Defined in Gibbon.L4.Syntax

Methods

rnf :: Tail -> () Source #

Eq Tail Source # 
Instance details

Defined in Gibbon.L4.Syntax

Methods

(==) :: Tail -> Tail -> Bool Source #

(/=) :: Tail -> Tail -> Bool Source #

Ord Tail Source # 
Instance details

Defined in Gibbon.L4.Syntax

type Rep Tail Source # 
Instance details

Defined in Gibbon.L4.Syntax

type Rep Tail = D1 ('MetaData "Tail" "Gibbon.L4.Syntax" "gibbon-0.3-inplace" 'False) ((((C1 ('MetaCons "RetValsT" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Triv])) :+: C1 ('MetaCons "EndOfMain" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "AssnValsT" 'PrefixI 'True) (S1 ('MetaSel ('Just "upd") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(Var, Ty, Triv)]) :*: S1 ('MetaSel ('Just "bod_maybe") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Tail))) :+: C1 ('MetaCons "LetCallT" 'PrefixI 'True) ((S1 ('MetaSel ('Just "async") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "binds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(Var, Ty)])) :*: (S1 ('MetaSel ('Just "rator") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Var) :*: (S1 ('MetaSel ('Just "rands") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Triv]) :*: S1 ('MetaSel ('Just "bod") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Tail)))))) :+: ((C1 ('MetaCons "LetPrimCallT" 'PrefixI 'True) ((S1 ('MetaSel ('Just "binds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(Var, Ty)]) :*: S1 ('MetaSel ('Just "prim") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Prim)) :*: (S1 ('MetaSel ('Just "rands") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Triv]) :*: S1 ('MetaSel ('Just "bod") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Tail))) :+: C1 ('MetaCons "LetTrivT" 'PrefixI 'True) (S1 ('MetaSel ('Just "bnd") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Var, Ty, Triv)) :*: S1 ('MetaSel ('Just "bod") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Tail))) :+: (C1 ('MetaCons "LetIfT" 'PrefixI 'True) (S1 ('MetaSel ('Just "binds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(Var, Ty)]) :*: (S1 ('MetaSel ('Just "ife") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Triv, Tail, Tail)) :*: S1 ('MetaSel ('Just "bod") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Tail))) :+: C1 ('MetaCons "LetUnpackT" 'PrefixI 'True) (S1 ('MetaSel ('Just "binds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(Var, Ty)]) :*: (S1 ('MetaSel ('Just "ptr") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Var) :*: S1 ('MetaSel ('Just "bod") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Tail)))))) :+: (((C1 ('MetaCons "LetAllocT" 'PrefixI 'True) (S1 ('MetaSel ('Just "lhs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Var) :*: (S1 ('MetaSel ('Just "vals") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(Ty, Triv)]) :*: S1 ('MetaSel ('Just "bod") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Tail))) :+: C1 ('MetaCons "LetAvailT" 'PrefixI 'True) (S1 ('MetaSel ('Just "vars") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Var]) :*: S1 ('MetaSel ('Just "bod") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Tail))) :+: (C1 ('MetaCons "IfT" 'PrefixI 'True) (S1 ('MetaSel ('Just "tst") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Triv) :*: (S1 ('MetaSel ('Just "con") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Tail) :*: S1 ('MetaSel ('Just "els") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Tail))) :+: C1 ('MetaCons "ErrT" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)))) :+: ((C1 ('MetaCons "LetTimedT" 'PrefixI 'True) ((S1 ('MetaSel ('Just "isIter") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "binds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(Var, Ty)])) :*: (S1 ('MetaSel ('Just "timed") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Tail) :*: S1 ('MetaSel ('Just "bod") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Tail))) :+: C1 ('MetaCons "Switch" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Label) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Triv)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Alts) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Tail))))) :+: (C1 ('MetaCons "TailCall" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Var) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Triv])) :+: (C1 ('MetaCons "Goto" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Label)) :+: C1 ('MetaCons "LetArenaT" 'PrefixI 'True) (S1 ('MetaSel ('Just "lhs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Var) :*: S1 ('MetaSel ('Just "bod") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Tail)))))))

data Triv Source #

Constructors

VarTriv Var 
IntTriv Int64 
CharTriv Char 
FloatTriv Double 
BoolTriv Bool 
TagTriv Tag 
SymTriv Word16

An index into the symbol table.

ProdTriv [Triv]

Tuples

ProjTriv Int Triv

Projections

Instances

Instances details
Out Triv Source # 
Instance details

Defined in Gibbon.L4.Syntax

Methods

docPrec :: Int -> Triv -> Doc Source #

doc :: Triv -> Doc Source #

docList :: [Triv] -> Doc Source #

Generic Triv Source # 
Instance details

Defined in Gibbon.L4.Syntax

Associated Types

type Rep Triv :: Type -> Type Source #

Methods

from :: Triv -> Rep Triv x Source #

to :: Rep Triv x -> Triv Source #

Show Triv Source # 
Instance details

Defined in Gibbon.L4.Syntax

NFData Triv Source # 
Instance details

Defined in Gibbon.L4.Syntax

Methods

rnf :: Triv -> () Source #

Eq Triv Source # 
Instance details

Defined in Gibbon.L4.Syntax

Methods

(==) :: Triv -> Triv -> Bool Source #

(/=) :: Triv -> Triv -> Bool Source #

Ord Triv Source # 
Instance details

Defined in Gibbon.L4.Syntax

type Rep Triv Source # 
Instance details

Defined in Gibbon.L4.Syntax

type Rep Triv = D1 ('MetaData "Triv" "Gibbon.L4.Syntax" "gibbon-0.3-inplace" 'False) (((C1 ('MetaCons "VarTriv" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Var)) :+: C1 ('MetaCons "IntTriv" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64))) :+: (C1 ('MetaCons "CharTriv" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Char)) :+: C1 ('MetaCons "FloatTriv" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double)))) :+: ((C1 ('MetaCons "BoolTriv" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :+: C1 ('MetaCons "TagTriv" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Tag))) :+: (C1 ('MetaCons "SymTriv" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word16)) :+: (C1 ('MetaCons "ProdTriv" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Triv])) :+: C1 ('MetaCons "ProjTriv" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Triv))))))

data Ty Source #

Constructors

IntTy

8 byte integers.

CharTy

4 byte characters.

FloatTy

8 byte floating point numbers

BoolTy

1 byte integers.

TagTyPacked

A single byte / Word8. Used in PACKED mode.

TagTyBoxed

A tag used in the UNPACKED, boxed, pointer-based, graph-of-structs representation. This can usually be the same as TagTy, but needn't necessarily be.

SymTy

Symbols used in writing compiler passes. It's an alias for Int, an index into a symbol table.

CursorTy

A byte-indexing pointer. This is always a pointer to a raw buffer of bytes that does not contain pointers.

PtrTy

A machine word. Same width as IntTy. Untyped. This is a pointer to a struct value which may contain other pointers.

RegionTy

Region start and a refcount

ChunkTy

Start and end pointers

ProdTy [Ty] 
SymDictTy Var Ty

We allow built-in dictionaries from symbols to a value type.

ArenaTy 
PDictTy Ty Ty 
VectorTy Ty 
ListTy Ty 
SymSetTy 
SymHashTy 
IntHashTy 

Instances

Instances details
Out Ty Source # 
Instance details

Defined in Gibbon.L4.Syntax

Methods

docPrec :: Int -> Ty -> Doc Source #

doc :: Ty -> Doc Source #

docList :: [Ty] -> Doc Source #

Generic Ty Source # 
Instance details

Defined in Gibbon.L4.Syntax

Associated Types

type Rep Ty :: Type -> Type Source #

Methods

from :: Ty -> Rep Ty x Source #

to :: Rep Ty x -> Ty Source #

Show Ty Source # 
Instance details

Defined in Gibbon.L4.Syntax

NFData Ty Source # 
Instance details

Defined in Gibbon.L4.Syntax

Methods

rnf :: Ty -> () Source #

Eq Ty Source # 
Instance details

Defined in Gibbon.L4.Syntax

Methods

(==) :: Ty -> Ty -> Bool Source #

(/=) :: Ty -> Ty -> Bool Source #

Ord Ty Source # 
Instance details

Defined in Gibbon.L4.Syntax

Methods

compare :: Ty -> Ty -> Ordering Source #

(<) :: Ty -> Ty -> Bool Source #

(<=) :: Ty -> Ty -> Bool Source #

(>) :: Ty -> Ty -> Bool Source #

(>=) :: Ty -> Ty -> Bool Source #

max :: Ty -> Ty -> Ty Source #

min :: Ty -> Ty -> Ty Source #

type Rep Ty Source # 
Instance details

Defined in Gibbon.L4.Syntax

type Rep Ty = D1 ('MetaData "Ty" "Gibbon.L4.Syntax" "gibbon-0.3-inplace" 'False) ((((C1 ('MetaCons "IntTy" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CharTy" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "FloatTy" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "BoolTy" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TagTyPacked" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "TagTyBoxed" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SymTy" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "CursorTy" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "PtrTy" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RegionTy" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "ChunkTy" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ProdTy" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Ty]))) :+: (C1 ('MetaCons "SymDictTy" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Var) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ty)) :+: (C1 ('MetaCons "ArenaTy" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PDictTy" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ty) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ty))))) :+: ((C1 ('MetaCons "VectorTy" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ty)) :+: C1 ('MetaCons "ListTy" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ty))) :+: (C1 ('MetaCons "SymSetTy" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "SymHashTy" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "IntHashTy" 'PrefixI 'False) (U1 :: Type -> Type))))))

data Prim Source #

Constructors

AddP 
SubP 
MulP 
DivP 
ModP 
EqP 
LtP 
GtP 
LtEqP 
GtEqP 
EqSymP 
EqBenchProgP String 
ExpP 
RandP 
FRandP 
FSqrtP 
FTanP 
FloatToIntP 
IntToFloatP 
SizeParam 
OrP 
AndP 
DictInsertP Ty

takes k,v,dict

DictLookupP Ty

takes k,dict, errors if absent

DictEmptyP Ty 
DictHasKeyP Ty 
SymSetEmpty 
SymSetContains 
SymSetInsert 
SymHashEmpty 
SymHashInsert 
SymHashLookup 
SymHashContains 
IntHashEmpty 
IntHashInsert 
IntHashLookup 
VAllocP Ty 
VFreeP Ty 
VFree2P Ty 
VLengthP Ty 
VNthP Ty 
VSliceP Ty 
InplaceVUpdateP Ty 
VConcatP Ty 
VSortP Ty 
InplaceVSortP Ty 
VMergeP Ty 
PDictAllocP Ty Ty 
PDictInsertP Ty Ty 
PDictLookupP Ty Ty 
PDictHasKeyP Ty Ty 
PDictForkP Ty Ty 
PDictJoinP Ty Ty 
LLAllocP Ty 
LLIsEmptyP Ty 
LLConsP Ty 
LLHeadP Ty 
LLTailP Ty 
LLFreeP Ty 
LLFree2P Ty 
LLCopyP Ty 
GetNumProcessors 
ReadPackedFile (Maybe FilePath) TyCon 
WritePackedFile FilePath TyCon 
ReadArrayFile (Maybe (FilePath, Int)) Ty 
NewBuffer Multiplicity

Allocate a new buffer, return a cursor.

NewParBuffer Multiplicity

Allocate a new buffer for parallel allocations, return a cursor.

ScopedBuffer Multiplicity

Returns a pointer to a buffer, with the invariant that data written to this region is no longer used after the enclosing function returns. I.e. this can be stack allocated data.

ScopedParBuffer Multiplicity

Like ScopedBuffer, but for parallel allocations.

EndOfBuffer Multiplicity 
MMapFileSize Var 
ReadTag

Read one byte from the cursor and advance it.

WriteTag

Write a static tag value, takes a cursor to target.

TagCursor

Create a tagged a cursor

ReadTaggedCursor 
WriteTaggedCursor 
ReadCursor

Read and return a cursor

WriteCursor 
ReadScalar Scalar 
WriteScalar Scalar 
ReadList 
WriteList 
ReadVector 
WriteVector 
BoundsCheck 
IndirectionBarrier TyCon 
BumpArenaRefCount 
FreeBuffer 
SizeOfPacked

Take start and end cursors and return size of data they represent This could be represented as (end - start) / (sizeof(Int))

SizeOfScalar

Takes in a variable, and returns an int, sizeof(var)

GetFirstWord

takes a PtrTy, returns IntTy containing the (first) word pointed to.

PrintInt

Print an integer to stdout.

PrintChar

Print a character to stdout.

PrintFloat

Print a floating point number to stdout.

PrintBool

Print a boolean to stdout.

PrintSym

Fetch a symbol from the symbol table, and print it.

PrintString String

Print a constant string to stdout. TODO: add string values to the language.

PrintRegionCount

Call print_global_region_count() defined in the RTS.

ReadInt 
ParSync

cilk_sync

GetCilkWorkerNum

Runs __cilkrts_get_worker_number()

IsBig 
Gensym 
FreeSymTable 
SSPush SSModality TyCon 
SSPop SSModality 
Assert 

Instances

Instances details
Out Prim Source # 
Instance details

Defined in Gibbon.L4.Syntax

Methods

docPrec :: Int -> Prim -> Doc Source #

doc :: Prim -> Doc Source #

docList :: [Prim] -> Doc Source #

Generic Prim Source # 
Instance details

Defined in Gibbon.L4.Syntax

Associated Types

type Rep Prim :: Type -> Type Source #

Methods

from :: Prim -> Rep Prim x Source #

to :: Rep Prim x -> Prim Source #

Show Prim Source # 
Instance details

Defined in Gibbon.L4.Syntax

NFData Prim Source # 
Instance details

Defined in Gibbon.L4.Syntax

Methods

rnf :: Prim -> () Source #

Eq Prim Source # 
Instance details

Defined in Gibbon.L4.Syntax

Methods

(==) :: Prim -> Prim -> Bool Source #

(/=) :: Prim -> Prim -> Bool Source #

Ord Prim Source # 
Instance details

Defined in Gibbon.L4.Syntax

type Rep Prim Source # 
Instance details

Defined in Gibbon.L4.Syntax

type Rep Prim = D1 ('MetaData "Prim" "Gibbon.L4.Syntax" "gibbon-0.3-inplace" 'False) ((((((C1 ('MetaCons "AddP" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "SubP" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MulP" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "DivP" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ModP" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "EqP" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "LtP" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "GtP" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LtEqP" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "GtEqP" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "EqSymP" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "EqBenchProgP" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)) :+: C1 ('MetaCons "ExpP" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "RandP" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "FRandP" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "FSqrtP" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "FTanP" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "FloatToIntP" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "IntToFloatP" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "SizeParam" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "OrP" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AndP" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "DictInsertP" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ty)) :+: C1 ('MetaCons "DictLookupP" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ty))) :+: (C1 ('MetaCons "DictEmptyP" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ty)) :+: C1 ('MetaCons "DictHasKeyP" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ty))))))) :+: ((((C1 ('MetaCons "SymSetEmpty" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "SymSetContains" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SymSetInsert" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "SymHashEmpty" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "SymHashInsert" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SymHashLookup" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "SymHashContains" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "IntHashEmpty" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "IntHashInsert" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "IntHashLookup" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "VAllocP" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ty))) :+: (C1 ('MetaCons "VFreeP" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ty)) :+: C1 ('MetaCons "VFree2P" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ty)))))) :+: (((C1 ('MetaCons "VLengthP" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ty)) :+: (C1 ('MetaCons "VNthP" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ty)) :+: C1 ('MetaCons "VSliceP" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ty)))) :+: ((C1 ('MetaCons "InplaceVUpdateP" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ty)) :+: C1 ('MetaCons "VConcatP" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ty))) :+: (C1 ('MetaCons "VSortP" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ty)) :+: C1 ('MetaCons "InplaceVSortP" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ty))))) :+: ((C1 ('MetaCons "VMergeP" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ty)) :+: (C1 ('MetaCons "PDictAllocP" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ty) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ty)) :+: C1 ('MetaCons "PDictInsertP" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ty) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ty)))) :+: ((C1 ('MetaCons "PDictLookupP" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ty) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ty)) :+: C1 ('MetaCons "PDictHasKeyP" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ty) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ty))) :+: (C1 ('MetaCons "PDictForkP" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ty) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ty)) :+: C1 ('MetaCons "PDictJoinP" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ty) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ty)))))))) :+: (((((C1 ('MetaCons "LLAllocP" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ty)) :+: (C1 ('MetaCons "LLIsEmptyP" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ty)) :+: C1 ('MetaCons "LLConsP" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ty)))) :+: (C1 ('MetaCons "LLHeadP" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ty)) :+: (C1 ('MetaCons "LLTailP" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ty)) :+: C1 ('MetaCons "LLFreeP" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ty))))) :+: ((C1 ('MetaCons "LLFree2P" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ty)) :+: (C1 ('MetaCons "LLCopyP" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ty)) :+: C1 ('MetaCons "GetNumProcessors" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ReadPackedFile" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe FilePath)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TyCon)) :+: C1 ('MetaCons "WritePackedFile" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TyCon))) :+: (C1 ('MetaCons "ReadArrayFile" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (FilePath, Int))) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ty)) :+: C1 ('MetaCons "NewBuffer" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Multiplicity)))))) :+: (((C1 ('MetaCons "NewParBuffer" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Multiplicity)) :+: (C1 ('MetaCons "ScopedBuffer" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Multiplicity)) :+: C1 ('MetaCons "ScopedParBuffer" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Multiplicity)))) :+: ((C1 ('MetaCons "EndOfBuffer" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Multiplicity)) :+: C1 ('MetaCons "MMapFileSize" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Var))) :+: (C1 ('MetaCons "ReadTag" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "WriteTag" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "TagCursor" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ReadTaggedCursor" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "WriteTaggedCursor" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ReadCursor" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "WriteCursor" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ReadScalar" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Scalar)) :+: C1 ('MetaCons "WriteScalar" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Scalar))))))) :+: ((((C1 ('MetaCons "ReadList" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "WriteList" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ReadVector" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "WriteVector" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "BoundsCheck" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "IndirectionBarrier" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TyCon))))) :+: ((C1 ('MetaCons "BumpArenaRefCount" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "FreeBuffer" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SizeOfPacked" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "SizeOfScalar" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GetFirstWord" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "PrintInt" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PrintChar" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "PrintFloat" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "PrintBool" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PrintSym" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "PrintString" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)) :+: C1 ('MetaCons "PrintRegionCount" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ReadInt" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ParSync" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "GetCilkWorkerNum" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "IsBig" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Gensym" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "FreeSymTable" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SSPush" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SSModality) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TyCon))) :+: (C1 ('MetaCons "SSPop" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SSModality)) :+: C1 ('MetaCons "Assert" 'PrefixI 'False) (U1 :: Type -> Type))))))))

data FunDecl Source #

Constructors

FunDecl 

Fields

Instances

Instances details
Out FunDecl Source # 
Instance details

Defined in Gibbon.L4.Syntax

Generic FunDecl Source # 
Instance details

Defined in Gibbon.L4.Syntax

Associated Types

type Rep FunDecl :: Type -> Type Source #

Show FunDecl Source # 
Instance details

Defined in Gibbon.L4.Syntax

NFData FunDecl Source # 
Instance details

Defined in Gibbon.L4.Syntax

Methods

rnf :: FunDecl -> () Source #

Eq FunDecl Source # 
Instance details

Defined in Gibbon.L4.Syntax

Ord FunDecl Source # 
Instance details

Defined in Gibbon.L4.Syntax

type Rep FunDecl Source # 
Instance details

Defined in Gibbon.L4.Syntax

data Alts Source #

Switch alternatives.

Constructors

TagAlts [(Tag, Tail)]

Casing on tags.

IntAlts [(Int64, Tail)]

Casing on integers.

Instances

Instances details
Out Alts Source # 
Instance details

Defined in Gibbon.L4.Syntax

Methods

docPrec :: Int -> Alts -> Doc Source #

doc :: Alts -> Doc Source #

docList :: [Alts] -> Doc Source #

Generic Alts Source # 
Instance details

Defined in Gibbon.L4.Syntax

Associated Types

type Rep Alts :: Type -> Type Source #

Methods

from :: Alts -> Rep Alts x Source #

to :: Rep Alts x -> Alts Source #

Show Alts Source # 
Instance details

Defined in Gibbon.L4.Syntax

NFData Alts Source # 
Instance details

Defined in Gibbon.L4.Syntax

Methods

rnf :: Alts -> () Source #

Eq Alts Source # 
Instance details

Defined in Gibbon.L4.Syntax

Methods

(==) :: Alts -> Alts -> Bool Source #

(/=) :: Alts -> Alts -> Bool Source #

Ord Alts Source # 
Instance details

Defined in Gibbon.L4.Syntax

type Rep Alts Source # 
Instance details

Defined in Gibbon.L4.Syntax

type Rep Alts = D1 ('MetaData "Alts" "Gibbon.L4.Syntax" "gibbon-0.3-inplace" 'False) (C1 ('MetaCons "TagAlts" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(Tag, Tail)])) :+: C1 ('MetaCons "IntAlts" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(Int64, Tail)])))

data Prog Source #

Instances

Instances details
Out Prog Source # 
Instance details

Defined in Gibbon.L4.Syntax

Methods

docPrec :: Int -> Prog -> Doc Source #

doc :: Prog -> Doc Source #

docList :: [Prog] -> Doc Source #

Generic Prog Source # 
Instance details

Defined in Gibbon.L4.Syntax

Associated Types

type Rep Prog :: Type -> Type Source #

Methods

from :: Prog -> Rep Prog x Source #

to :: Rep Prog x -> Prog Source #

Show Prog Source # 
Instance details

Defined in Gibbon.L4.Syntax

NFData Prog Source # 
Instance details

Defined in Gibbon.L4.Syntax

Methods

rnf :: Prog -> () Source #

Eq Prog Source # 
Instance details

Defined in Gibbon.L4.Syntax

Methods

(==) :: Prog -> Prog -> Bool Source #

(/=) :: Prog -> Prog -> Bool Source #

Ord Prog Source # 
Instance details

Defined in Gibbon.L4.Syntax

Pretty Prog Source # 
Instance details

Defined in Gibbon.Pretty

type Rep Prog Source # 
Instance details

Defined in Gibbon.L4.Syntax

data MainExp Source #

Constructors

PrintExp Tail

Evaluate the expression and print the result. Type of the expression must will eventually be anything, but not all types support printing currently [2017.01.03].

Instances

Instances details
Out MainExp Source # 
Instance details

Defined in Gibbon.L4.Syntax

Generic MainExp Source # 
Instance details

Defined in Gibbon.L4.Syntax

Associated Types

type Rep MainExp :: Type -> Type Source #

Show MainExp Source # 
Instance details

Defined in Gibbon.L4.Syntax

NFData MainExp Source # 
Instance details

Defined in Gibbon.L4.Syntax

Methods

rnf :: MainExp -> () Source #

Eq MainExp Source # 
Instance details

Defined in Gibbon.L4.Syntax

Ord MainExp Source # 
Instance details

Defined in Gibbon.L4.Syntax

type Rep MainExp Source # 
Instance details

Defined in Gibbon.L4.Syntax

type Rep MainExp = D1 ('MetaData "MainExp" "Gibbon.L4.Syntax" "gibbon-0.3-inplace" 'False) (C1 ('MetaCons "PrintExp" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Tail)))

type Label = Var Source #

data DataConInfo Source #

Instances

Instances details
Out DataConInfo Source # 
Instance details

Defined in Gibbon.L4.Syntax

Generic DataConInfo Source # 
Instance details

Defined in Gibbon.L4.Syntax

Associated Types

type Rep DataConInfo :: Type -> Type Source #

Show DataConInfo Source # 
Instance details

Defined in Gibbon.L4.Syntax

NFData DataConInfo Source # 
Instance details

Defined in Gibbon.L4.Syntax

Methods

rnf :: DataConInfo -> () Source #

Eq DataConInfo Source # 
Instance details

Defined in Gibbon.L4.Syntax

Ord DataConInfo Source # 
Instance details

Defined in Gibbon.L4.Syntax

type Rep DataConInfo Source # 
Instance details

Defined in Gibbon.L4.Syntax

data Scalar Source #

Constructors

IntS 
CharS 
FloatS 
SymS 
BoolS 

Instances

Instances details
Out Scalar Source # 
Instance details

Defined in Gibbon.L3.Syntax

Generic Scalar Source # 
Instance details

Defined in Gibbon.L3.Syntax

Associated Types

type Rep Scalar :: Type -> Type Source #

Read Scalar Source # 
Instance details

Defined in Gibbon.L3.Syntax

Show Scalar Source # 
Instance details

Defined in Gibbon.L3.Syntax

NFData Scalar Source # 
Instance details

Defined in Gibbon.L3.Syntax

Methods

rnf :: Scalar -> () Source #

Eq Scalar Source # 
Instance details

Defined in Gibbon.L3.Syntax

Ord Scalar Source # 
Instance details

Defined in Gibbon.L3.Syntax

type Rep Scalar Source # 
Instance details

Defined in Gibbon.L3.Syntax

type Rep Scalar = D1 ('MetaData "Scalar" "Gibbon.L3.Syntax" "gibbon-0.3-inplace" 'False) ((C1 ('MetaCons "IntS" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CharS" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "FloatS" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "SymS" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BoolS" 'PrefixI 'False) (U1 :: Type -> Type))))

Utility functions

withTail :: MonadState Int m => (Tail, Ty) -> ([Triv] -> Tail) -> m Tail Source #

Extend the tail of a Tail. Take the return values from a Tail expression and do some more computation.

WARNING: presently this may invoke the given function more than once and duplicate code.

Orphan instances

Out Int64 Source # 
Instance details

Out Word16 Source # 
Instance details

Out Word8 Source # 
Instance details