Documentation ¶
Index ¶
- Variables
- type Access
- type Apply
- type Call
- type Const
- type Constructor
- type DataOption
- type Definition
- type Expression
- func NewAccess(loc ast.Location, record Expression, fieldName ast.Identifier) Expression
- func NewApply(loc ast.Location, fn Expression, args []Expression) Expression
- func NewConst(loc ast.Location, value ast.ConstValue) Expression
- func NewConstructor(loc ast.Location, moduleName ast.QualifiedIdentifier, dataName ast.Identifier, ...) Expression
- func NewFunction(loc ast.Location, name ast.Identifier, params []Pattern, body Expression, ...) Expression
- func NewGlobal(loc ast.Location, moduleName ast.QualifiedIdentifier, ...) Expression
- func NewLambda(loc ast.Location, params []Pattern, body Expression) Expression
- func NewLet(loc ast.Location, pattern Pattern, value Expression, nested Expression) Expression
- func NewList(loc ast.Location, items []Expression) Expression
- func NewLocal(loc ast.Location, name ast.Identifier, target Pattern, ...) Expression
- func NewNativeCall(loc ast.Location, name ast.FullIdentifier, args []Expression) Expression
- func NewRecord(loc ast.Location, fields []*RecordField) Expression
- func NewSelect(loc ast.Location, condition Expression, cases []*SelectCase) Expression
- func NewTuple(loc ast.Location, items []Expression) Expression
- func NewUpdateGlobal(loc ast.Location, moduleName ast.QualifiedIdentifier, ...) Expression
- func NewUpdateLocal(loc ast.Location, recordName ast.Identifier, target Pattern, ...) Expression
- type Function
- type Global
- type Lambda
- type Let
- type List
- type Local
- type Module
- func (module *Module) AddDefinition(definition Definition)
- func (module *Module) AddDependencies(modName ast.QualifiedIdentifier, identName ast.Identifier)
- func (module *Module) Annotate(modules map[ast.QualifiedIdentifier]*Module, ...) (errors []error)
- func (module *Module) Dependencies() []ast.QualifiedIdentifier
- func (module *Module) Location() ast.Location
- type PAlias
- type PAny
- type PCons
- type PConst
- type PList
- type PNamed
- type POption
- type PRecord
- type PRecordField
- type PTuple
- type Pattern
- func NewPAlias(loc ast.Location, declaredType Type, alias ast.Identifier, nested Pattern) Pattern
- func NewPAny(loc ast.Location, declaredType Type) Pattern
- func NewPCons(loc ast.Location, declaredType Type, head, tail Pattern) Pattern
- func NewPConst(loc ast.Location, type_ Type, value ast.ConstValue) Pattern
- func NewPList(loc ast.Location, declaredType Type, items []Pattern) Pattern
- func NewPNamed(loc ast.Location, declaredType Type, name ast.Identifier) Pattern
- func NewPOption(loc ast.Location, declaredType Type, moduleName ast.QualifiedIdentifier, ...) Pattern
- func NewPRecord(loc ast.Location, declaredType Type, fields []*PRecordField) Pattern
- func NewPTuple(loc ast.Location, declaredType Type, items []Pattern) Pattern
- type Record
- type RecordField
- type Select
- type SelectCase
- type Statement
- type TData
- type TFunc
- type TNative
- type TParameter
- type TPlaceholder
- type TRecord
- type TTuple
- type TUnit
- type Tuple
- type Type
- func NewTData(loc ast.Location, name ast.FullIdentifier, args []Type, options []*DataOption) Type
- func NewTFunc(loc ast.Location, params []Type, ret Type) Type
- func NewTNative(loc ast.Location, name ast.FullIdentifier, args []Type) Type
- func NewTParameter(loc ast.Location, name ast.Identifier) Type
- func NewTPlaceholder(name ast.FullIdentifier) Type
- func NewTRecord(loc ast.Location, fields map[ast.Identifier]Type) Type
- func NewTTuple(loc ast.Location, items []Type) Type
- func NewTUnit(loc ast.Location) Type
- type Update
- type WithSuccessor
Constants ¶
This section is empty.
Variables ¶
View Source
var LastDefinitionId = uint64(0)
Functions ¶
This section is empty.
Types ¶
type Apply ¶
type Apply struct {
// contains filtered or unexported fields
}
func (*Apply) Func ¶
func (e *Apply) Func() Expression
type Constructor ¶
type Constructor struct {
// contains filtered or unexported fields
}
type DataOption ¶
type DataOption struct {
// contains filtered or unexported fields
}
func NewDataOption ¶
func NewDataOption(name ast.Identifier, hidden bool, values []Type) *DataOption
type Definition ¶
type Definition interface { Statement FlattenLambdas(params map[ast.Identifier]Pattern, o *Module) Params() []Pattern // contains filtered or unexported methods }
func NewDefinition ¶
func NewDefinition( location ast.Location, id uint64, hidden bool, name ast.Identifier, nameLocation ast.Location, params []Pattern, body Expression, declaredType Type, ) Definition
type Expression ¶
type Expression interface { Statement // contains filtered or unexported methods }
func NewAccess ¶
func NewAccess(loc ast.Location, record Expression, fieldName ast.Identifier) Expression
func NewApply ¶
func NewApply(loc ast.Location, fn Expression, args []Expression) Expression
func NewConst ¶
func NewConst(loc ast.Location, value ast.ConstValue) Expression
func NewConstructor ¶
func NewConstructor( loc ast.Location, moduleName ast.QualifiedIdentifier, dataName ast.Identifier, optionName ast.Identifier, args []Expression, ) Expression
func NewFunction ¶
func NewFunction( loc ast.Location, name ast.Identifier, params []Pattern, body Expression, fnType Type, nested Expression, predecessor WithSuccessor, ) Expression
func NewGlobal ¶
func NewGlobal( loc ast.Location, moduleName ast.QualifiedIdentifier, definitionName ast.Identifier, ) Expression
func NewLambda ¶
func NewLambda(loc ast.Location, params []Pattern, body Expression) Expression
func NewLet ¶
func NewLet(loc ast.Location, pattern Pattern, value Expression, nested Expression) Expression
func NewList ¶
func NewList(loc ast.Location, items []Expression) Expression
func NewLocal ¶
func NewLocal(loc ast.Location, name ast.Identifier, target Pattern, predecessor WithSuccessor) Expression
func NewNativeCall ¶
func NewNativeCall(loc ast.Location, name ast.FullIdentifier, args []Expression) Expression
func NewRecord ¶
func NewRecord(loc ast.Location, fields []*RecordField) Expression
func NewSelect ¶
func NewSelect(loc ast.Location, condition Expression, cases []*SelectCase) Expression
func NewTuple ¶
func NewTuple(loc ast.Location, items []Expression) Expression
func NewUpdateGlobal ¶
func NewUpdateGlobal( loc ast.Location, moduleName ast.QualifiedIdentifier, definitionName ast.Identifier, fields []*RecordField, ) Expression
func NewUpdateLocal ¶
func NewUpdateLocal(loc ast.Location, recordName ast.Identifier, target Pattern, fields []*RecordField) Expression
type Global ¶
type Global struct {
// contains filtered or unexported fields
}
func (*Global) DefinitionName ¶
func (e *Global) DefinitionName() (ast.QualifiedIdentifier, ast.Identifier)
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
func NewModule ¶
func NewModule(location ast.Location, name ast.QualifiedIdentifier, definitions []Definition) *Module
func (*Module) AddDefinition ¶
func (module *Module) AddDefinition(definition Definition)
func (*Module) AddDependencies ¶
func (module *Module) AddDependencies(modName ast.QualifiedIdentifier, identName ast.Identifier)
func (*Module) Annotate ¶
func (module *Module) Annotate( modules map[ast.QualifiedIdentifier]*Module, typedModules map[ast.QualifiedIdentifier]*typed.Module, ) (errors []error)
func (*Module) Dependencies ¶
func (module *Module) Dependencies() []ast.QualifiedIdentifier
type PAlias ¶
type PAlias struct {
// contains filtered or unexported fields
}
func (*PAlias) Alias ¶
func (e *PAlias) Alias() ast.Identifier
type PNamed ¶
type PNamed struct {
// contains filtered or unexported fields
}
func (*PNamed) Name ¶
func (e *PNamed) Name() ast.Identifier
type POption ¶
type POption struct {
// contains filtered or unexported fields
}
func (*POption) DefinitionName ¶
func (e *POption) DefinitionName() (ast.QualifiedIdentifier, ast.Identifier)
type PRecord ¶
type PRecord struct {
// contains filtered or unexported fields
}
func (*PRecord) Fields ¶
func (e *PRecord) Fields() []*PRecordField
type PRecordField ¶
type PRecordField struct {
// contains filtered or unexported fields
}
func NewPRecordField ¶
func NewPRecordField(loc ast.Location, name ast.Identifier) *PRecordField
func (PRecordField) Name ¶
func (f PRecordField) Name() ast.Identifier
type Pattern ¶
type Pattern interface { Statement // contains filtered or unexported methods }
func NewPOption ¶
func NewPOption( loc ast.Location, declaredType Type, moduleName ast.QualifiedIdentifier, definitionName ast.Identifier, values []Pattern, ) Pattern
func NewPRecord ¶
func NewPRecord(loc ast.Location, declaredType Type, fields []*PRecordField) Pattern
type RecordField ¶
type RecordField struct {
// contains filtered or unexported fields
}
func NewRecordField ¶
func NewRecordField(loc ast.Location, name ast.Identifier, value Expression) *RecordField
type Select ¶
type Select struct {
// contains filtered or unexported fields
}
func (*Select) Cases ¶
func (e *Select) Cases() []*SelectCase
type SelectCase ¶
type SelectCase struct {
// contains filtered or unexported fields
}
func NewSelectCase ¶
func NewSelectCase(loc ast.Location, pattern Pattern, expression Expression) *SelectCase
func (SelectCase) Location ¶
func (c SelectCase) Location() ast.Location
func (SelectCase) Pattern ¶
func (c SelectCase) Pattern() Pattern
type TParameter ¶
type TParameter struct {
// contains filtered or unexported fields
}
type TPlaceholder ¶
type TPlaceholder struct {
// contains filtered or unexported fields
}
func (TPlaceholder) SetSuccessor ¶
type Type ¶
type Type interface { Statement SetSuccessor(typedType typed.Type) typed.Type // contains filtered or unexported methods }
func NewTData ¶
func NewTData(loc ast.Location, name ast.FullIdentifier, args []Type, options []*DataOption) Type
func NewTNative ¶
func NewTParameter ¶
func NewTParameter(loc ast.Location, name ast.Identifier) Type
func NewTPlaceholder ¶
func NewTPlaceholder(name ast.FullIdentifier) Type
func NewTRecord ¶
type WithSuccessor ¶
type WithSuccessor interface {
SetSuccessor(s Expression)
}
Source Files ¶
- defines.go
- definition.go
- expression.go
- expression_access.go
- expression_apply.go
- expression_call.go
- expression_const.go
- expression_constructor.go
- expression_function.go
- expression_global.go
- expression_lambda.go
- expression_let.go
- expression_list.go
- expression_local.go
- expression_record.go
- expression_select.go
- expression_tuple.go
- expression_update.go
- module.go
- pattern.go
- pattern_alias.go
- pattern_any.go
- pattern_cons.go
- pattern_const.go
- pattern_list.go
- pattern_named.go
- pattern_option.go
- pattern_record.go
- pattern_tuple.go
- type.go
- type_data.go
- type_func.go
- type_native.go
- type_parameter.go
- type_placeholder.go
- type_record.go
- type_tuple.go
- type_unit.go
- utils.go
Click to show internal directories.
Click to hide internal directories.