Documentation
¶
Index ¶
- func FilterEmptyWeaveFields(group []Field) (filtered []Field)
- func ParseWeaveOperator(span *Span, ideals Symbol) (Faculty, error)
- func ParseWeaverVariety(span *Span, arg *StructSymbol, name string) (*VarietySymbol, error)
- type EvalWeaveMacro
- type Weave
- type WeaveController
- func (b *WeaveController) Combine(weaveSpan *Span, _ *Func, _ Arg, returns Return, stepResidues StepResidues) (Effect, error)
- func (b *WeaveController) Enter(weaveSpan *Span, arg Arg) (Shape, Effect, error)
- func (b *WeaveController) Figure(weaveSpan *Span, figure Figure) (Shape, Effect, error)
- func (b *WeaveController) GroupWeaveFields(span *Span, fields Fields) (WeaveFields, error)
- func (b *WeaveController) Interpret(_ Evaluator, f *Func) Macro
- func (b *WeaveController) Leave(weaveSpan *Span, shape Shape) (Return, Effect, error)
- func (b *WeaveController) Unwrap(shape Shape) Symbol
- func (b *WeaveController) UnwrapArg(arg Arg) Symbol
- func (b *WeaveController) UnwrapEffect(eff Effect) Symbol
- func (b *WeaveController) Weave() (returns, effect Symbol, err error)
- func (b *WeaveController) WeaveResidues(stepResidues StepResidues) WeaveResidues
- func (b *WeaveController) WeaveStepCtx(weaveSpan *Span) *WeaveStepCtx
- func (b *WeaveController) WeaveSummary(returns Symbol) *WeaveSummary
- func (b *WeaveController) Wrap(symbol Symbol) Shape
- func (b *WeaveController) WrapEffect(symbol Symbol) Effect
- type WeaveEffect
- type WeaveField
- type WeaveFields
- type WeaveFigure
- type WeaveFunc
- type WeaveFuncMacro
- type WeaveObject
- func (b WeaveObject) Augment(weaveSpan *Span, fields Fields) (Shape, Effect, error)
- func (b WeaveObject) Invoke(weaveSpan *Span) (Shape, Effect, error)
- func (b WeaveObject) Link(weaveSpan *Span, name string, monadic bool) (Shape, Effect, error)
- func (b WeaveObject) Select(weaveSpan *Span, path Path) (Shape, Effect, error)
- func (b WeaveObject) String() string
- type WeaveOperator
- type WeaveOperatorMacro
- type WeavePlaceholderMacro
- func (WeavePlaceholderMacro) Doc() string
- func (WeavePlaceholderMacro) Help() string
- func (WeavePlaceholderMacro) Invoke(span *Span, arg Arg) (Return, Effect, error)
- func (WeavePlaceholderMacro) Label() string
- func (WeavePlaceholderMacro) MacroID() string
- func (WeavePlaceholderMacro) MacroSheathString() *string
- func (WeavePlaceholderMacro) Splay() Tree
- type WeaveResidue
- type WeaveResidues
- type WeaveStepCtx
- type WeaveStepResult
- type WeaveSummary
- type WeaveTransform
- type Weaver
- func (b *Weaver) Augment(ctx *WeaveStepCtx, object Symbol, fields WeaveFields) (*WeaveStepResult, error)
- func (b *Weaver) Combine(summary *WeaveSummary, steps WeaveResidues) (*WeaveStepResult, error)
- func (b *Weaver) Enter(ctx *WeaveStepCtx, object Symbol) (*WeaveStepResult, error)
- func (b *Weaver) Invoke(ctx *WeaveStepCtx, object Symbol) (*WeaveStepResult, error)
- func (b *Weaver) Leave(ctx *WeaveStepCtx, object Symbol) (*WeaveStepResult, error)
- func (b *Weaver) Link(ctx *WeaveStepCtx, object Symbol, name string, monadic bool) (*WeaveStepResult, error)
- func (b *Weaver) Literal(ctx *WeaveStepCtx, figure *WeaveFigure) (*WeaveStepResult, error)
- func (b *Weaver) Select(ctx *WeaveStepCtx, object Symbol, path Path) (*WeaveStepResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterEmptyWeaveFields ¶
func FilterEmptyWeaveFields(group []Field) (filtered []Field)
func ParseWeaveOperator ¶
func ParseWeaveOperator(span *Span, ideals Symbol) (Faculty, error)
func ParseWeaverVariety ¶
Types ¶
type EvalWeaveMacro ¶
type EvalWeaveMacro struct{}
func (EvalWeaveMacro) Doc ¶
func (m EvalWeaveMacro) Doc() string
func (EvalWeaveMacro) Help ¶
func (m EvalWeaveMacro) Help() string
func (EvalWeaveMacro) Invoke ¶
func (EvalWeaveMacro) Invoke(span *Span, arg Arg) (returns Return, effect Effect, err error)
func (EvalWeaveMacro) Label ¶
func (m EvalWeaveMacro) Label() string
func (EvalWeaveMacro) MacroID ¶
func (m EvalWeaveMacro) MacroID() string
func (EvalWeaveMacro) MacroSheathString ¶
func (m EvalWeaveMacro) MacroSheathString() *string
type Weave ¶
type Weave struct { Idiom Repo Repo Repo Weaver *Weaver Func *Func Ctx Symbol Arg Symbol }
type WeaveController ¶
type WeaveController struct { Origin *Span `ko:"name=origin"` // evaluation span (not weave span) Weaver *Weaver `ko:"name=weaver"` Func *Func `ko:"name=func"` Ctx Symbol `ko:"name=ctx"` Arg Symbol `ko:"name=arg"` Program Program `ko:"name=program"` }
func (*WeaveController) Combine ¶
func (b *WeaveController) Combine( weaveSpan *Span, _ *Func, _ Arg, returns Return, stepResidues StepResidues, ) (Effect, error)
func (*WeaveController) Enter ¶
func (b *WeaveController) Enter(weaveSpan *Span, arg Arg) (Shape, Effect, error)
func (*WeaveController) Figure ¶
func (b *WeaveController) Figure(weaveSpan *Span, figure Figure) (Shape, Effect, error)
func (*WeaveController) GroupWeaveFields ¶
func (b *WeaveController) GroupWeaveFields(span *Span, fields Fields) (WeaveFields, error)
func (*WeaveController) Interpret ¶
func (b *WeaveController) Interpret(_ Evaluator, f *Func) Macro
func (*WeaveController) Leave ¶
func (b *WeaveController) Leave(weaveSpan *Span, shape Shape) (Return, Effect, error)
func (*WeaveController) Unwrap ¶
func (b *WeaveController) Unwrap(shape Shape) Symbol
func (*WeaveController) UnwrapArg ¶
func (b *WeaveController) UnwrapArg(arg Arg) Symbol
func (*WeaveController) UnwrapEffect ¶
func (b *WeaveController) UnwrapEffect(eff Effect) Symbol
func (*WeaveController) Weave ¶
func (b *WeaveController) Weave() (returns, effect Symbol, err error)
weave forwards eval panics from the caller evaluator environment.
func (*WeaveController) WeaveResidues ¶
func (b *WeaveController) WeaveResidues(stepResidues StepResidues) WeaveResidues
func (*WeaveController) WeaveStepCtx ¶
func (b *WeaveController) WeaveStepCtx(weaveSpan *Span) *WeaveStepCtx
func (*WeaveController) WeaveSummary ¶
func (b *WeaveController) WeaveSummary(returns Symbol) *WeaveSummary
func (*WeaveController) Wrap ¶
func (b *WeaveController) Wrap(symbol Symbol) Shape
func (*WeaveController) WrapEffect ¶
func (b *WeaveController) WrapEffect(symbol Symbol) Effect
type WeaveEffect ¶
type WeaveEffect struct {
Effect Symbol `ko:"name=effect"`
}
WeaveEffect is an Effect.
func (WeaveEffect) String ¶
func (b WeaveEffect) String() string
type WeaveField ¶
type WeaveField struct { Name string `ko:"name=name"` Monadic bool `ko:"name=monadic"` Objects Symbol `ko:"name=objects"` }
func (*WeaveField) Deconstruct ¶
func (field *WeaveField) Deconstruct(span *Span) Symbol
type WeaveFields ¶
type WeaveFields []*WeaveField
func (WeaveFields) Deconstruct ¶
func (bf WeaveFields) Deconstruct(span *Span) (Symbol, error)
type WeaveFigure ¶
type WeaveFigure struct { Int64 *int64 `ko:"name=int64"` String *string `ko:"name=string"` Bool *bool `ko:"name=bool"` Float64 *float64 `ko:"name=float64"` Transform *WeaveTransform `ko:"name=transform"` }
func (*WeaveFigure) Deconstruct ¶
func (fig *WeaveFigure) Deconstruct(span *Span) Symbol
func (*WeaveFigure) Play ¶
func (fig *WeaveFigure) Play(*runtime.Context) *WeaveFigure
type WeaveFuncMacro ¶
type WeaveFuncMacro struct { WeavePlaceholderMacro `ko:"name=placeholder"` Func *Func `ko:"name=func"` }
type WeaveObject ¶
type WeaveObject struct { Controller *WeaveController `ko:"name=controller"` Object Symbol `ko:"name=object"` }
WeaveObject is a Shape.
func (WeaveObject) Augment ¶
func (b WeaveObject) Augment(weaveSpan *Span, fields Fields) (Shape, Effect, error)
func (WeaveObject) Invoke ¶
func (b WeaveObject) Invoke(weaveSpan *Span) (Shape, Effect, error)
func (WeaveObject) Link ¶
func (b WeaveObject) Link(weaveSpan *Span, name string, monadic bool) (Shape, Effect, error)
func (WeaveObject) Select ¶
func (b WeaveObject) Select(weaveSpan *Span, path Path) (Shape, Effect, error)
func (WeaveObject) String ¶
func (b WeaveObject) String() string
type WeaveOperator ¶
func (*WeaveOperator) Play ¶
func (w *WeaveOperator) Play(*runtime.Context) *WeaveOperator
type WeaveOperatorMacro ¶
type WeaveOperatorMacro struct { WeavePlaceholderMacro `ko:"name=placeholder"` Ideal Ideal `ko:"name=ideal"` }
type WeavePlaceholderMacro ¶
type WeavePlaceholderMacro struct{}
func (WeavePlaceholderMacro) Doc ¶
func (WeavePlaceholderMacro) Doc() string
func (WeavePlaceholderMacro) Help ¶
func (WeavePlaceholderMacro) Help() string
func (WeavePlaceholderMacro) Invoke ¶
func (WeavePlaceholderMacro) Invoke(span *Span, arg Arg) (Return, Effect, error)
func (WeavePlaceholderMacro) Label ¶
func (WeavePlaceholderMacro) Label() string
func (WeavePlaceholderMacro) MacroID ¶
func (WeavePlaceholderMacro) MacroID() string
func (WeavePlaceholderMacro) MacroSheathString ¶
func (WeavePlaceholderMacro) MacroSheathString() *string
func (WeavePlaceholderMacro) Splay ¶
func (WeavePlaceholderMacro) Splay() Tree
type WeaveResidue ¶
type WeaveResidue struct { Step string `ko:"name=step"` Logic string `ko:"name=logic"` Source string `ko:"name=source"` Returns Symbol `ko:"name=returns"` Effect Symbol `ko:"name=effect"` }
func (*WeaveResidue) Deconstruct ¶
func (residue *WeaveResidue) Deconstruct(span *Span) Symbol
type WeaveResidues ¶
type WeaveResidues []*WeaveResidue
func (WeaveResidues) Deconstruct ¶
func (br WeaveResidues) Deconstruct(span *Span) (Symbol, error)
type WeaveStepCtx ¶
type WeaveStepCtx struct { Origin *Span `ko:"name=origin"` // evaluation span (not weave span) Pkg string `ko:"name=pkg"` Func string `ko:"name=func"` Step string `ko:"name=step"` Logic string `ko:"name=logic"` Source string `ko:"name=source"` Ctx Symbol `ko:"name=ctx"` // user ctx object }
func (*WeaveStepCtx) Deconstruct ¶
func (ctx *WeaveStepCtx) Deconstruct(span *Span) Symbol
func (*WeaveStepCtx) DelegateSpan ¶
func (ctx *WeaveStepCtx) DelegateSpan() *Span
type WeaveStepResult ¶
type WeaveStepResult struct { Returns Symbol `ko:"name=returns"` Effect Symbol `ko:"name=effect"` }
type WeaveSummary ¶
type WeaveSummary struct { Origin *Span `ko:"name=origin"` // evaluation span (not weave span) Pkg string `ko:"name=pkg"` Func string `ko:"name=func"` Source string `ko:"name=source"` Ctx Symbol `ko:"name=ctx"` // user ctx object Arg Symbol `ko:"name=arg"` Returns Symbol `ko:"name=returns"` }
func (*WeaveSummary) CombineSpan ¶
func (summary *WeaveSummary) CombineSpan() *Span
func (*WeaveSummary) Deconstruct ¶
func (summary *WeaveSummary) Deconstruct(span *Span) Symbol
type WeaveTransform ¶
type WeaveTransform struct { Operator *WeaveOperator `ko:"name=operator"` Func *WeaveFunc `ko:"name=func"` }
func (*WeaveTransform) Play ¶
func (w *WeaveTransform) Play(*runtime.Context) *WeaveTransform
type Weaver ¶
type Weaver struct { Operator Faculty `ko:"name=operator"` EnterVariety *VarietySymbol `ko:"name=Enter"` LeaveVariety *VarietySymbol `ko:"name=Leave"` LiteralVariety *VarietySymbol `ko:"name=Literal"` LinkVariety *VarietySymbol `ko:"name=Link"` SelectVariety *VarietySymbol `ko:"name=Select"` AugmentVariety *VarietySymbol `ko:"name=Augment"` InvokeVariety *VarietySymbol `ko:"name=Invoke"` CombineVariety *VarietySymbol `ko:"name=Combine"` }
func ParseWeaver ¶
func (*Weaver) Augment ¶
func (b *Weaver) Augment(ctx *WeaveStepCtx, object Symbol, fields WeaveFields) (*WeaveStepResult, error)
func (*Weaver) Combine ¶
func (b *Weaver) Combine(summary *WeaveSummary, steps WeaveResidues) (*WeaveStepResult, error)
func (*Weaver) Enter ¶
func (b *Weaver) Enter(ctx *WeaveStepCtx, object Symbol) (*WeaveStepResult, error)
func (*Weaver) Invoke ¶
func (b *Weaver) Invoke(ctx *WeaveStepCtx, object Symbol) (*WeaveStepResult, error)
func (*Weaver) Leave ¶
func (b *Weaver) Leave(ctx *WeaveStepCtx, object Symbol) (*WeaveStepResult, error)
func (*Weaver) Link ¶
func (b *Weaver) Link(ctx *WeaveStepCtx, object Symbol, name string, monadic bool) (*WeaveStepResult, error)
func (*Weaver) Literal ¶
func (b *Weaver) Literal(ctx *WeaveStepCtx, figure *WeaveFigure) (*WeaveStepResult, error)
func (*Weaver) Select ¶
func (b *Weaver) Select(ctx *WeaveStepCtx, object Symbol, path Path) (*WeaveStepResult, error)
Click to show internal directories.
Click to hide internal directories.