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

Gibbon.L1.Syntax

Description

The source language for recursive tree traversals. This is a first-order language for the "closed world" scenario: not integrating with a functional host language, but rather genarating C code like a DSL.

Synopsis

Core types specific to L1

type Prog1 = Prog Exp1 Source #

An L1 program.

type FunDef1 = FunDef Exp1 Source #

Function definition used in L1 programs.

type DDefs1 = DDefs Ty1 Source #

Datatypes

type Exp1 = PreExp E1Ext () Ty1 Source #

A convenient, default instantiation of the L1 expression type.

type Ty1 = UrTy () Source #

The type rperesentation used in L1.

data E1Ext loc dec Source #

Constructors

BenchE Var [loc] [PreExp E1Ext loc dec] Bool 
AddFixed Var Int 
StartOfPkdCursor Var 

Instances

Instances details
Interp () Exp1 Source # 
Instance details

Defined in Gibbon.L1.Interp

InterpProg () Exp1 Source # 
Instance details

Defined in Gibbon.L1.Interp

InterpExt () Exp1 (E1Ext () Ty1) Source # 
Instance details

Defined in Gibbon.L1.Interp

(Out loc, Out dec) => Out (E1Ext loc dec) Source # 
Instance details

Defined in Gibbon.L1.Syntax

Methods

docPrec :: Int -> E1Ext loc dec -> Doc Source #

doc :: E1Ext loc dec -> Doc Source #

docList :: [E1Ext loc dec] -> Doc Source #

Generic (E1Ext loc dec) Source # 
Instance details

Defined in Gibbon.L1.Syntax

Associated Types

type Rep (E1Ext loc dec) :: Type -> Type Source #

Methods

from :: E1Ext loc dec -> Rep (E1Ext loc dec) x Source #

to :: Rep (E1Ext loc dec) x -> E1Ext loc dec Source #

(Read loc, Read dec) => Read (E1Ext loc dec) Source # 
Instance details

Defined in Gibbon.L1.Syntax

Methods

readsPrec :: Int -> ReadS (E1Ext loc dec) Source #

readList :: ReadS [E1Ext loc dec] Source #

readPrec :: ReadPrec (E1Ext loc dec) Source #

readListPrec :: ReadPrec [E1Ext loc dec] Source #

(Show loc, Show dec) => Show (E1Ext loc dec) Source # 
Instance details

Defined in Gibbon.L1.Syntax

Methods

showsPrec :: Int -> E1Ext loc dec -> ShowS Source #

show :: E1Ext loc dec -> String Source #

showList :: [E1Ext loc dec] -> ShowS Source #

(NFData loc, NFData dec) => NFData (E1Ext loc dec) Source # 
Instance details

Defined in Gibbon.L1.Syntax

Methods

rnf :: E1Ext loc dec -> () Source #

(Eq loc, Eq dec) => Eq (E1Ext loc dec) Source # 
Instance details

Defined in Gibbon.L1.Syntax

Methods

(==) :: E1Ext loc dec -> E1Ext loc dec -> Bool Source #

(/=) :: E1Ext loc dec -> E1Ext loc dec -> Bool Source #

(Ord loc, Ord dec) => Ord (E1Ext loc dec) Source # 
Instance details

Defined in Gibbon.L1.Syntax

Methods

compare :: E1Ext loc dec -> E1Ext loc dec -> Ordering Source #

(<) :: E1Ext loc dec -> E1Ext loc dec -> Bool Source #

(<=) :: E1Ext loc dec -> E1Ext loc dec -> Bool Source #

(>) :: E1Ext loc dec -> E1Ext loc dec -> Bool Source #

(>=) :: E1Ext loc dec -> E1Ext loc dec -> Bool Source #

max :: E1Ext loc dec -> E1Ext loc dec -> E1Ext loc dec Source #

min :: E1Ext loc dec -> E1Ext loc dec -> E1Ext loc dec Source #

(Show l, Show d, Out l, Out d) => Expression (E1Ext l d) Source # 
Instance details

Defined in Gibbon.L1.Syntax

Associated Types

type TyOf (E1Ext l d) Source #

type LocOf (E1Ext l d) Source #

Methods

isTrivial :: E1Ext l d -> Bool Source #

(Show l, Show d, Out l, Out d) => Flattenable (E1Ext l d) Source # 
Instance details

Defined in Gibbon.L1.Syntax

Methods

gFlattenExp :: DDefs (TyOf (E1Ext l d)) -> Env2 (TyOf (E1Ext l d)) -> E1Ext l d -> PassM (E1Ext l d) Source #

gFlattenGatherBinds :: DDefs (TyOf (E1Ext l d)) -> Env2 (TyOf (E1Ext l d)) -> E1Ext l d -> PassM ([Binds (E1Ext l d)], E1Ext l d) Source #

FreeVars (E1Ext l d) Source # 
Instance details

Defined in Gibbon.L1.Syntax

Methods

gFreeVars :: E1Ext l d -> Set Var Source #

HasRenamable E1Ext l d => Renamable (E1Ext l d) Source # 
Instance details

Defined in Gibbon.L1.Syntax

Methods

gRename :: Map Var Var -> E1Ext l d -> E1Ext l d Source #

Typeable (E1Ext () (UrTy ())) Source # 
Instance details

Defined in Gibbon.L1.Syntax

Methods

gRecoverType :: DDefs (TyOf (E1Ext () (UrTy ()))) -> Env2 (TyOf (E1Ext () (UrTy ()))) -> E1Ext () (UrTy ()) -> TyOf (E1Ext () (UrTy ())) Source #

(Pretty l, Pretty d, Ord d, Show d) => Pretty (E1Ext l d) Source # 
Instance details

Defined in Gibbon.Pretty

Methods

pprintWithStyle :: PPStyle -> E1Ext l d -> Doc Source #

pprint :: E1Ext l d -> Doc Source #

HasSimplifiableExt E1Ext l d => SimplifiableExt (PreExp E1Ext l d) (E1Ext l d) Source # 
Instance details

Defined in Gibbon.L1.Syntax

Methods

gInlineTrivExt :: Map Var (PreExp E1Ext l d) -> E1Ext l d -> E1Ext l d Source #

HasSubstitutableExt E1Ext l d => SubstitutableExt (PreExp E1Ext l d) (E1Ext l d) Source # 
Instance details

Defined in Gibbon.L1.Syntax

Methods

gSubstExt :: Var -> PreExp E1Ext l d -> E1Ext l d -> E1Ext l d Source #

gSubstEExt :: PreExp E1Ext l d -> PreExp E1Ext l d -> E1Ext l d -> E1Ext l d Source #

type Rep (E1Ext loc dec) Source # 
Instance details

Defined in Gibbon.L1.Syntax

type LocOf (E1Ext l d) Source # 
Instance details

Defined in Gibbon.L1.Syntax

type LocOf (E1Ext l d) = l
type TyOf (E1Ext l d) Source # 
Instance details

Defined in Gibbon.L1.Syntax

type TyOf (E1Ext l d) = d

Orphan instances

FunctionTy Ty1 Source # 
Instance details

Associated Types

type ArrowTy Ty1 Source #

Renamable () Source # 
Instance details

Methods

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