ContentsIndex
Core.Exp
Synopsis
type Tree = [Top]
data Top
= PNil
| PBind Var Type Exp
| PSuper Var Type Type Exp
| PExtern Var Type Type
| PData Var [Var] [(Var, [DataField Exp Type])]
| PCtor Var Type Type
| PEffect Var
data Exp
= XNothing
| XNil
| XAnnot Annot Exp
| XVar Var
| XLambda Var Type Exp
| XApp Exp Type
| XAppE Exp Exp [Effect]
| XDo [Stmt]
| XMatchE [Effect] [Alt]
| XConst Const
| XUnit
| XProj Exp Proj Type Type [Effect]
| XCall Var [Exp] [Effect]
| XCallApp Var Int [Exp] [Effect]
| XApply Var [Exp] [Effect]
| XCurry Var Int [Exp]
| XSuspend Var [Exp]
| XAppF [Exp]
| XAppFP Exp (Maybe [Effect])
| XType Type
| XAt Var Exp
| XLifted Var [Var]
data Proj
= JField Var
| JFieldR Var
data Stmt
= SComment String
| SStmt Exp
| SBind Var Type Exp
data Attr
= RBoxed
| RStrict
data Alt
= AAlt [Guard] Exp
| ADefault Exp
data Guard
= GDefault
| GUnit Exp
| GConst Exp Const
| GCon Exp Var [(Label, Var, Type)]
data Label = LIndex Int
data Type
= TNil
| TNothing
| TVar Var
| TVarC Var Var
| TForall [(Var, Type)] Type
| TFun Type Type
| TFunEE Type Type [Effect] [Exp]
| TCon Var [Attr] [Type]
| TColored Var Type
| TMerge [Effect]
| TKType
| TKRegion
| TKEffect
| TTypeL Type [(Var, ([Effect], [Exp]))]
| TFunV Type Type (Maybe Var)
data Effect
= ENil
| EVar Var
| EPort Var
| EPipe Var
| EEnd Var
| ECon Var [Var]
| ESum [Effect]
data Annot
= NString String
| NType Type
Documentation
type Tree = [Top]
data Top
Top level expression.
Constructors
PNil
PBind Var Type ExpA Top level binding.
PSuper Var Type Type ExpA supercombinator. var, value type, operational type, exp.
PExtern Var Type TypeA function or effect imported from somewhere else. name, value type, operational type
PData Var [Var] [(Var, [DataField Exp Type])]
PCtor Var Type TypeConstructor: ctor name, value type, operational type
PEffect VarA global effect.
show/hide Instances
Data Top
Eq Top
Pretty Top
Show Top
Typeable Top
data Exp
Constructors
XNothingEmpty expression In contrast to XNil, an XNothing represents some part of the tree with is _supposed_ to be empty between stages
XNilNil expression. XNil is used internally by compiler stages as a place holder for information that isn't present at the moment. If Core.Lint finds any XNil's _after_ a stage has completed then it will complain.
XAnnot Annot ExpAnnotation.
XVar VarA variable.
XLambda Var Type ExpLambda abstraction. Invariant: exp must be an XLambda or an XDo.
XApp Exp TypeType application.
XAppE Exp Exp [Effect]Function application with effects.
XDo [Stmt]Do expression.
XMatchE [Effect] [Alt]Matching of constructors and constants with effects. Matching causes read effects on the match targets.
XConst ConstLiterals.
XUnitThe unit value.
XProj Exp Proj Type Type [Effect]
XCall Var [Exp] [Effect]Call a super, args, effects
XCallApp Var Int [Exp] [Effect]Call then apply super. name, super airity, args, effs
XApply Var [Exp] [Effect]Apply a thunk. thunk name, args, effects
XCurry Var Int [Exp]Build a thunk. combinator name, super airity, args
XSuspend Var [Exp]
XAppF [Exp]
XAppFP Exp (Maybe [Effect])
XType Type
XAt Var Exp
XLifted Var [Var]Place holder for a lambda abstraction that was lifted out name of lifted function. Name of supercombinator, vars which were free in lifted expression.
show/hide Instances
Data Exp
Eq Exp
Pretty Exp
Show Exp
Typeable Exp
data Proj
Constructors
JField Var
JFieldR Var
show/hide Instances
Data Proj
Eq Proj
Show Proj
Typeable Proj
data Stmt
Statments, sequencing.
Constructors
SComment String
SStmt ExpStatement.
SBind Var Type ExpLet binding.
show/hide Instances
Data Stmt
Eq Stmt
Pretty Stmt
Show Stmt
Typeable Stmt
data Attr
Constructors
RBoxed
RStrict
show/hide Instances
Data Attr
Eq Attr
Show Attr
Typeable Attr
data Alt
A match alternative.
Constructors
AAlt [Guard] Exp
ADefault Exp
show/hide Instances
Data Alt
Eq Alt
Pretty Alt
Show Alt
Typeable Alt
data Guard
Constructors
GDefaultMatches any value.
GUnit ExpExp must match with unit value.
GConst Exp ConstExp must evaluate to const.
GCon Exp Var [(Label, Var, Type)]Exp must match constructor, then bind args.
show/hide Instances
Data Guard
Eq Guard
Pretty Guard
Show Guard
Typeable Guard
data Label
Constructors
LIndex Int
show/hide Instances
Data Label
Eq Label
Pretty Label
Show Label
Typeable Label
data Type
Constructors
TNil
TNothing
TVar Var
TVarC Var Var
TForall [(Var, Type)] Typeforall quantification. Each var appears along with its kind.
TFun Type TypeFunctions without effect or environment annotations Used for operational types.
TFunEE Type Type [Effect] [Exp]Functions with an effect and an environment. Used for types of value expressions.
TCon Var [Attr] [Type]Type constructor.
TColored Var TypeColored modes.
TMerge [Effect]Some collection of effects
TKTypeThe type kind.
TKRegionThe region kind.
TKEffectThe effect kind.
TTypeL Type [(Var, ([Effect], [Exp]))]A labeled type with closure info.
TFunV Type Type (Maybe Var)A labeled function.
show/hide Instances
Data Type
Eq Type
Pretty Type
Show Type
Typeable Type
data Effect
Constructors
ENil
EVar Var
EPort Var
EPipe Var
EEnd Var
ECon Var [Var]
ESum [Effect]
show/hide Instances
data Annot
Expression annotations. Used internally, and for debugging.
Constructors
NString StringSome string: for debugging.
NType TypeGives the type for an expression.
show/hide Instances
Data Annot
Eq Annot
Pretty Annot
Show Annot
Typeable Annot
Produced by Haddock version 0.7