Documentation ¶
Index ¶
- Constants
- func RefineMacro(span *model.Span, macro Macro) *model.Span
- type Arg
- type Bool
- func (v Bool) Augment(span *model.Span, _ Fields) (Shape, Effect, error)
- func (v Bool) Invoke(span *model.Span) (Shape, Effect, error)
- func (v Bool) Link(span *model.Span, name string, monadic bool) (Shape, Effect, error)
- func (v Bool) Select(span *model.Span, path model.Path) (Shape, Effect, error)
- func (v Bool) String() string
- type Boundary
- type Combiner
- type Effect
- type Empty
- func (e Empty) Augment(span *model.Span, _ Fields) (Shape, Effect, error)
- func (e Empty) Invoke(span *model.Span) (Shape, Effect, error)
- func (e Empty) Link(span *model.Span, name string, monadic bool) (Shape, Effect, error)
- func (e Empty) Select(span *model.Span, path model.Path) (Shape, Effect, error)
- func (e Empty) String() string
- type Evaluator
- type Faculty
- func (f Faculty) Add(key Ideal, value Macro)
- func (f Faculty) AddExclusive(key Ideal, value Macro)
- func (f Faculty) DocFunc(pkgPath, funcName string) (string, bool)
- func (f Faculty) DocPackage(pkgPath string) (string, bool)
- func (f Faculty) ID() string
- func (f Faculty) PkgNames() []string
- func (f Faculty) SortedIdeals() (ideals Ideals)
- func (f Faculty) String() string
- func (f Faculty) StringTable(header string) [][]string
- type Field
- type Fields
- func (v Fields) Augment(span *model.Span, _ Fields) (Shape, Effect, error)
- func (v Fields) FieldGroup() [][]Field
- func (v Fields) Fields() []Field
- func (v Fields) Invoke(span *model.Span) (Shape, Effect, error)
- func (v Fields) IsEmpty() bool
- func (v Fields) Link(span *model.Span, name string, monadic bool) (Shape, Effect, error)
- func (v Fields) Names() []string
- func (v Fields) RestrictTo(name string) Fields
- func (v Fields) Select(span *model.Span, path model.Path) (Shape, Effect, error)
- func (v Fields) String() string
- func (v Fields) StringField(label string) (string, error)
- type Figure
- type Float
- func (v Float) Augment(span *model.Span, _ Fields) (Shape, Effect, error)
- func (v Float) Invoke(span *model.Span) (Shape, Effect, error)
- func (v Float) Link(span *model.Span, name string, monadic bool) (Shape, Effect, error)
- func (v Float) Select(span *model.Span, path model.Path) (Shape, Effect, error)
- func (v Float) String() string
- type GateMacro
- type Ideal
- type Ideals
- type IdentityBoundary
- type IdentityCombiner
- type Integer
- func (v Integer) Augment(span *model.Span, _ Fields) (Shape, Effect, error)
- func (v Integer) Invoke(span *model.Span) (Shape, Effect, error)
- func (v Integer) Link(span *model.Span, name string, monadic bool) (Shape, Effect, error)
- func (v Integer) Select(span *model.Span, path model.Path) (Shape, Effect, error)
- func (v Integer) String() string
- type Macro
- type MacroCases
- type MacroSheath
- type Program
- func (prog Program) EvalIdiom() model.Repo
- func (prog Program) EvalPar(span *model.Span, f *model.Func, arg Arg) (Return, Effect, error)
- func (prog Program) EvalRepo() model.Repo
- func (prog Program) EvalSeq(span *model.Span, f *model.Func, arg Arg) (Return, Effect, error)
- func (prog Program) String() string
- type Registry
- func (r *Registry) RegisterGate(stub interface{})
- func (r *Registry) RegisterGateAt(pkg, name string, stub interface{})
- func (r *Registry) RegisterMacro(name string, macro Macro)
- func (r *Registry) RegisterNamedGate(name string, stub interface{})
- func (r *Registry) RegisterPkgMacro(pkg, name string, macro Macro)
- func (r *Registry) Snapshot() Faculty
- type Return
- type Shape
- type StepResidue
- type StepResidues
- type String
- func (v String) Augment(span *model.Span, _ Fields) (Shape, Effect, error)
- func (v String) Invoke(span *model.Span) (Shape, Effect, error)
- func (v String) Link(span *model.Span, name string, monadic bool) (Shape, Effect, error)
- func (v String) Select(span *model.Span, path model.Path) (Shape, Effect, error)
- func (v String) String() string
- type System
- type Variety
- func (v Variety) Augment(span *model.Span, arg Fields) (Shape, Effect, error)
- func (v Variety) Doc() string
- func (v Variety) Invoke(span *model.Span) (Shape, Effect, error)
- func (v Variety) Link(span *model.Span, name string, monadic bool) (Shape, Effect, error)
- func (v Variety) Select(span *model.Span, path model.Path) (Shape, Effect, error)
- func (v Variety) String() string
Constants ¶
View Source
const IdiomRootPkg = "idiom"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Evaluator ¶
type Evaluator interface { String() string EvalPar(*model.Span, *model.Func, Arg) (Return, Effect, error) EvalSeq(*model.Span, *model.Func, Arg) (Return, Effect, error) EvalIdiom() model.Repo EvalRepo() model.Repo }
func SpanEvaluator ¶
type Faculty ¶
func MergeFaculty ¶
func MergeFacultyExclusive ¶
func (Faculty) AddExclusive ¶
func (Faculty) SortedIdeals ¶
func (Faculty) StringTable ¶
type Field ¶
type Fields ¶
type Fields []Field
func (Fields) FieldGroup ¶
func (Fields) RestrictTo ¶
type IdentityBoundary ¶
type IdentityBoundary struct{}
type IdentityCombiner ¶
type IdentityCombiner struct{}
type Integer ¶
type Integer struct{ Value_ int64 }
type Macro ¶
type Macro interface { Figure MacroID() string // MacroID uniquely identifies the meaning of this macro // The top-level circuit step in the frame argument is the circuit invocation step // corresponding to this operator invocation. Invoke(*model.Span, Arg) (Return, Effect, error) Label() string // string identifier Help() string // human-readable line of text, used in "ko list" MacroSheathString() *string // human-readable line ot text show in debug frames (if not nil) Doc() string }
type MacroCases ¶
type MacroCases []Macro
type MacroSheath ¶
type MacroSheath struct {
Macro Macro `ko:"name=macro"`
}
func (MacroSheath) SheathID ¶
func (sh MacroSheath) SheathID() *model.ID
func (MacroSheath) SheathLabel ¶
func (sh MacroSheath) SheathLabel() *string
func (MacroSheath) SheathString ¶
func (sh MacroSheath) SheathString() *string
type Program ¶
type Program struct { Idiom model.Repo `ko:"name=idiom"` Repo model.Repo `ko:"name=repo"` // function repository from user sources System `ko:"name=system"` }
Program is an Evaluator.
type Registry ¶
type Registry struct { sync.Mutex `ko:"name=mutex"` GateMacro `ko:"name=gateMacro"` Faculty Faculty `ko:"name=faculty"` }
func NewRegistry ¶
func (*Registry) RegisterGate ¶
func (r *Registry) RegisterGate(stub interface{})
RegisterGate registers a gate with the name and package of the given stub.
func (*Registry) RegisterGateAt ¶
RegisterGateAt registers a gate with given name in the given package.
func (*Registry) RegisterMacro ¶
func (*Registry) RegisterNamedGate ¶
RegisterNamedGate registers a gate with the given name in the package of the given stub.
func (*Registry) RegisterPkgMacro ¶
type Shape ¶
type Shape interface { String() string Select(*model.Span, model.Path) (Shape, Effect, error) Link(*model.Span, string, bool) (Shape, Effect, error) Augment(*model.Span, Fields) (Shape, Effect, error) Invoke(*model.Span) (Shape, Effect, error) }
Shape is an interface implemented by figures (Integer, Float, String, Bool, Empty, Variety) and Fields.
type StepResidue ¶
type StepResidue struct { Span *model.Span `ko:"name=span"` Shape Shape `ko:"name=shape"` Effect Effect `ko:"name=effect"` }
func FlowResidues ¶
func FlowResidues(stepFlow []flow.Flow) (stepResidue []*StepResidue)
type StepResidues ¶
type StepResidues []*StepResidue
func (StepResidues) String ¶
func (sr StepResidues) String() string
Click to show internal directories.
Click to hide internal directories.