Documentation ¶
Index ¶
- type Access
- type Apply
- type Call
- type Const
- type Constructor
- type DataOption
- type Definition
- func (def *Definition) Body() Expression
- func (def *Definition) Bytecode(pathId ast.FullIdentifier, modName ast.QualifiedIdentifier, ...) bytecode.Func
- func (def *Definition) Children() []Statement
- func (def *Definition) Code(currentModule ast.QualifiedIdentifier) string
- func (def *Definition) DeclaredType() Type
- func (def *Definition) Id() uint64
- func (def *Definition) Location() ast.Location
- func (def *Definition) Name() ast.Identifier
- func (def *Definition) NameLocation() ast.Location
- func (def *Definition) Params() []Pattern
- func (def *Definition) SetDeclaredType(declaredType Type)
- func (def *Definition) SetExpression(body Expression)
- func (def *Definition) SetParams(params []Pattern)
- func (def *Definition) SolvingContext() *SolvingContext
- type Equation
- type Equations
- type Expression
- func NewAccess(ctx *SolvingContext, loc ast.Location, fieldName ast.Identifier, ...) Expression
- func NewApply(ctx *SolvingContext, loc ast.Location, func_ Expression, args []Expression) (Expression, error)
- func NewCall(ctx *SolvingContext, loc ast.Location, name ast.FullIdentifier, ...) (Expression, error)
- func NewConst(ctx *SolvingContext, loc ast.Location, value ast.ConstValue) Expression
- func NewConstructor(ctx *SolvingContext, loc ast.Location, dataName ast.FullIdentifier, ...) Expression
- func NewGlobal(ctx *SolvingContext, loc ast.Location, moduleName ast.QualifiedIdentifier, ...) Expression
- func NewLet(ctx *SolvingContext, loc ast.Location, pattern Pattern, value Expression, ...) Expression
- func NewList(ctx *SolvingContext, loc ast.Location, items []Expression) Expression
- func NewLocal(ctx *SolvingContext, loc ast.Location, name ast.Identifier, target Pattern) Expression
- func NewRecord(ctx *SolvingContext, loc ast.Location, fields []*RecordField) Expression
- func NewSelect(ctx *SolvingContext, loc ast.Location, condition Expression, ...) Expression
- func NewTuple(ctx *SolvingContext, loc ast.Location, items []Expression) Expression
- func NewUpdateGlobal(ctx *SolvingContext, loc ast.Location, moduleName ast.QualifiedIdentifier, ...) Expression
- func NewUpdateLocal(loc ast.Location, recordName ast.Identifier, target Pattern, ...) Expression
- type Global
- type Let
- type List
- type Local
- type Module
- func (module *Module) AddDefinition(def *Definition)
- func (module *Module) CheckPatterns() (errors []error)
- func (module *Module) CheckTypes() (errors []error)
- func (module *Module) Compose(modules map[ast.QualifiedIdentifier]*Module, debug bool, ...) error
- func (module *Module) FindDefinition(name ast.Identifier) (*Definition, bool)
- 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(ctx *SolvingContext, loc ast.Location, declaredType Type, alias ast.Identifier, ...) Pattern
- func NewPAny(ctx *SolvingContext, loc ast.Location, declaredType Type) Pattern
- func NewPCons(ctx *SolvingContext, loc ast.Location, declaredType Type, head Pattern, ...) Pattern
- func NewPConst(ctx *SolvingContext, loc ast.Location, declaredType Type, value ast.ConstValue) Pattern
- func NewPList(ctx *SolvingContext, loc ast.Location, declaredType Type, items []Pattern) Pattern
- func NewPNamed(ctx *SolvingContext, loc ast.Location, declaredType Type, name ast.Identifier) Pattern
- func NewPOption(ctx *SolvingContext, loc ast.Location, declaredType Type, ...) (Pattern, error)
- func NewPRecord(ctx *SolvingContext, loc ast.Location, declaredType Type, ...) Pattern
- func NewPTuple(ctx *SolvingContext, loc ast.Location, declaredType Type, items []Pattern) (Pattern, error)
- type Record
- type RecordField
- type Select
- type SelectCase
- type SolvingContext
- type Statement
- type TData
- type TFunc
- type TNative
- type TRecord
- type TTuple
- type TUnbound
- type Tuple
- type Type
- func NewTData(loc ast.Location, name ast.FullIdentifier, args []Type, options []*DataOption) Type
- func NewTFunc(loc ast.Location, params []Type, return_ Type) Type
- func NewTNative(loc ast.Location, name ast.FullIdentifier, args []Type) Type
- func NewTParameter(ctx *SolvingContext, loc ast.Location, predecessor TypePredecessor, ...) Type
- func NewTRecord(loc ast.Location, fields map[ast.Identifier]Type, mayHaveMoreFields bool) Type
- func NewTTuple(loc ast.Location, items []Type) Type
- type TypePredecessor
- type Update
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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
}
func (*Constructor) Children ¶
func (e *Constructor) Children() []Statement
func (*Constructor) Code ¶
func (e *Constructor) Code(currentModule ast.QualifiedIdentifier) string
func (*Constructor) DataName ¶
func (e *Constructor) DataName() ast.FullIdentifier
type DataOption ¶
type DataOption struct {
// contains filtered or unexported fields
}
func NewDataOption ¶
func NewDataOption(name ast.DataOptionIdentifier, values []Type) *DataOption
func (*DataOption) Children ¶
func (d *DataOption) Children() []Statement
func (*DataOption) String ¶
func (d *DataOption) String() string
type Definition ¶
type Definition struct {
// contains filtered or unexported fields
}
func NewDefinition ¶
func NewDefinition( location ast.Location, id uint64, hidden bool, name ast.Identifier, nameLocation ast.Location, ) *Definition
func (*Definition) Body ¶
func (def *Definition) Body() Expression
func (*Definition) Bytecode ¶
func (def *Definition) Bytecode(pathId ast.FullIdentifier, modName ast.QualifiedIdentifier, binary *bytecode.Binary, hash *bytecode.BinaryHash) bytecode.Func
func (*Definition) Children ¶
func (def *Definition) Children() []Statement
func (*Definition) Code ¶
func (def *Definition) Code(currentModule ast.QualifiedIdentifier) string
func (*Definition) DeclaredType ¶
func (def *Definition) DeclaredType() Type
func (*Definition) Id ¶
func (def *Definition) Id() uint64
func (*Definition) Location ¶
func (def *Definition) Location() ast.Location
func (*Definition) Name ¶
func (def *Definition) Name() ast.Identifier
func (*Definition) NameLocation ¶
func (def *Definition) NameLocation() ast.Location
func (*Definition) Params ¶
func (def *Definition) Params() []Pattern
func (*Definition) SetDeclaredType ¶
func (def *Definition) SetDeclaredType(declaredType Type)
func (*Definition) SetExpression ¶
func (def *Definition) SetExpression(body Expression)
func (*Definition) SetParams ¶
func (def *Definition) SetParams(params []Pattern)
func (*Definition) SolvingContext ¶
func (def *Definition) SolvingContext() *SolvingContext
type Equation ¶
type Equation struct {
// contains filtered or unexported fields
}
func NewEquationBestLoc ¶
type Expression ¶
func NewAccess ¶
func NewAccess(ctx *SolvingContext, loc ast.Location, fieldName ast.Identifier, record Expression) Expression
func NewApply ¶
func NewApply(ctx *SolvingContext, loc ast.Location, func_ Expression, args []Expression) (Expression, error)
func NewCall ¶
func NewCall(ctx *SolvingContext, loc ast.Location, name ast.FullIdentifier, args []Expression) (Expression, error)
func NewConst ¶
func NewConst(ctx *SolvingContext, loc ast.Location, value ast.ConstValue) Expression
func NewConstructor ¶
func NewConstructor( ctx *SolvingContext, loc ast.Location, dataName ast.FullIdentifier, optionName ast.Identifier, dataType *TData, args []Expression, ) Expression
func NewGlobal ¶
func NewGlobal( ctx *SolvingContext, loc ast.Location, moduleName ast.QualifiedIdentifier, definitionName ast.Identifier, targetDef *Definition, ) Expression
func NewLet ¶
func NewLet(ctx *SolvingContext, loc ast.Location, pattern Pattern, value Expression, body Expression) Expression
func NewList ¶
func NewList(ctx *SolvingContext, loc ast.Location, items []Expression) Expression
func NewLocal ¶
func NewLocal(ctx *SolvingContext, loc ast.Location, name ast.Identifier, target Pattern) Expression
func NewRecord ¶
func NewRecord(ctx *SolvingContext, loc ast.Location, fields []*RecordField) Expression
func NewSelect ¶
func NewSelect(ctx *SolvingContext, loc ast.Location, condition Expression, cases []*SelectCase) Expression
func NewTuple ¶
func NewTuple(ctx *SolvingContext, loc ast.Location, items []Expression) Expression
func NewUpdateGlobal ¶
func NewUpdateGlobal( ctx *SolvingContext, loc ast.Location, moduleName ast.QualifiedIdentifier, definitionName ast.Identifier, targetDef *Definition, 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) Definition ¶
func (e *Global) Definition() *Definition
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
func NewModule ¶
func NewModule( location ast.Location, name ast.QualifiedIdentifier, dependencies map[ast.QualifiedIdentifier][]ast.Identifier, definitions []*Definition, ) *Module
func (*Module) AddDefinition ¶
func (module *Module) AddDefinition(def *Definition)
func (*Module) CheckPatterns ¶
func (*Module) CheckTypes ¶
func (*Module) Compose ¶
func (module *Module) Compose( modules map[ast.QualifiedIdentifier]*Module, debug bool, binary *bytecode.Binary, hash *bytecode.BinaryHash, ) error
func (*Module) FindDefinition ¶
func (module *Module) FindDefinition(name ast.Identifier) (*Definition, bool)
type PAlias ¶
type PAlias struct {
// contains filtered or unexported fields
}
func (PAlias) DeclaredType ¶
func (p PAlias) DeclaredType() Type
type PAny ¶
type PAny struct {
// contains filtered or unexported fields
}
func (PAny) DeclaredType ¶
func (p PAny) DeclaredType() Type
type PCons ¶
type PCons struct {
// contains filtered or unexported fields
}
func (PCons) DeclaredType ¶
func (p PCons) DeclaredType() Type
type PConst ¶
type PConst struct {
// contains filtered or unexported fields
}
func (PConst) DeclaredType ¶
func (p PConst) DeclaredType() Type
type PList ¶
type PList struct {
// contains filtered or unexported fields
}
func (PList) DeclaredType ¶
func (p PList) DeclaredType() Type
type PNamed ¶
type PNamed struct {
// contains filtered or unexported fields
}
func (PNamed) DeclaredType ¶
func (p PNamed) DeclaredType() Type
type POption ¶
type POption struct {
// contains filtered or unexported fields
}
func (POption) DeclaredType ¶
func (p POption) DeclaredType() Type
func (*POption) Definition ¶
func (p *POption) Definition() *Definition
type PRecord ¶
type PRecord struct {
// contains filtered or unexported fields
}
func (PRecord) DeclaredType ¶
func (p PRecord) DeclaredType() Type
type PRecordField ¶
type PRecordField struct {
// contains filtered or unexported fields
}
func NewPRecordField ¶
func NewPRecordField( ctx *SolvingContext, loc ast.Location, name ast.Identifier, declaredType Type, ) *PRecordField
func (PRecordField) Code ¶
func (f PRecordField) Code(currentModule ast.QualifiedIdentifier) string
func (PRecordField) Location ¶
func (f PRecordField) Location() ast.Location
type PTuple ¶
type PTuple struct {
// contains filtered or unexported fields
}
func (PTuple) DeclaredType ¶
func (p PTuple) DeclaredType() Type
type Pattern ¶
type Pattern interface { Statement Type() Type DeclaredType() Type // contains filtered or unexported methods }
func NewPAlias ¶
func NewPAlias(ctx *SolvingContext, loc ast.Location, declaredType Type, alias ast.Identifier, nested Pattern) Pattern
func NewPConst ¶
func NewPConst(ctx *SolvingContext, loc ast.Location, declaredType Type, value ast.ConstValue) Pattern
func NewPNamed ¶
func NewPNamed(ctx *SolvingContext, loc ast.Location, declaredType Type, name ast.Identifier) Pattern
func NewPOption ¶
func NewPOption( ctx *SolvingContext, loc ast.Location, declaredType Type, definition *Definition, args []Pattern, ) (Pattern, error)
func NewPRecord ¶
func NewPRecord(ctx *SolvingContext, loc ast.Location, declaredType Type, fields []*PRecordField) Pattern
type RecordField ¶
type RecordField struct {
// contains filtered or unexported fields
}
func NewRecordField ¶
func NewRecordField( ctx *SolvingContext, loc ast.Location, name ast.Identifier, value Expression, ) *RecordField
func (RecordField) Code ¶
func (r RecordField) Code(currentModule ast.QualifiedIdentifier) string
func (RecordField) Location ¶
func (r RecordField) Location() ast.Location
type SelectCase ¶
type SelectCase struct {
// contains filtered or unexported fields
}
func NewSelectCase ¶
func NewSelectCase(loc ast.Location, pattern Pattern, expression Expression) *SelectCase
type SolvingContext ¶
type SolvingContext struct {
// contains filtered or unexported fields
}
type TData ¶
type TData struct {
// contains filtered or unexported fields
}
func (*TData) Name ¶
func (t *TData) Name() ast.FullIdentifier
func (*TData) SetOptions ¶
func (t *TData) SetOptions(options []*DataOption)
type TNative ¶
type TNative struct {
// contains filtered or unexported fields
}
func (*TNative) Name ¶
func (t *TNative) Name() ast.FullIdentifier
type Type ¶
type Type interface { Statement // 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(ctx *SolvingContext, loc ast.Location, predecessor TypePredecessor, name ast.Identifier) Type
func NewTRecord ¶
type TypePredecessor ¶
Source Files ¶
- defines.go
- definition.go
- equation.go
- expression.go
- expression_access.go
- expression_apply.go
- expression_call.go
- expression_const.go
- expression_constructor.go
- expression_global.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
- simplePattern.go
- solvingContext.go
- type.go
- type_data.go
- type_func.go
- type_native.go
- type_record.go
- type_tuple.go
- type_unbound.go
- utils.go
Click to show internal directories.
Click to hide internal directories.