sys

package
v0.0.0-...-dc6f9f8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 8, 2018 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParsePlayArguments

func ParsePlayArguments(args []string) *symbol.StructSymbol

ParsePlayArguments parses the given commandline arguments into a struct symbol.

func PostCompileFaculty

func PostCompileFaculty(baseFaculty eval.Faculty, repoPaths []string, repo model.Repo) eval.Faculty

Types

type Compile

type Compile struct {
	RepoDirs []string `ko:"name=repoDir"`
	PkgPaths []string `ko:"name=pkgPaths"`
	Show     bool     `ko:"name=show"`
}

Compile is a service to compile a Ko repository.

func (*Compile) Play

func (c *Compile) Play(ctx *runtime.Context) *CompileResult

Play runs the compilation service

type CompilePlay

type CompilePlay struct {
	Repo    []string             `ko:"name=repo"`
	Pkg     string               `ko:"name=pkg"`
	Func    string               `ko:"name=func"`
	Faculty eval.Faculty         `ko:"name=faculty"`
	Arg     *symbol.StructSymbol `ko:"name=arg"` // arg can be nil
	Show    bool                 `ko:"name=show"`
}

CompilePlay is a service that compiles a repository and plays it afterward.

func (*CompilePlay) Play

func (arg *CompilePlay) Play(ctx *runtime.Context) *PlayResult

Play runs the service.

type CompileResult

type CompileResult struct {
	Compile *Compile         `ko:"name=compile"`
	Repo    model.Repo       `ko:"name=repo"`
	Stats   *model.RepoStats `ko:"name=stats"`
	Error   error            `ko:"name=error"`
}

CompileResult holds the result of a compile service.

type CompileTest

type CompileTest struct {
	Repo    []string     `ko:"name=repo"`
	Pkgs    []string     `ko:"name=pkg"`
	Faculty eval.Faculty `ko:"name=faculty"`
	Show    bool         `ko:"name=show"`
}

CompileTest is a service that compiles a repository and runs all tests in it afterward.

func (*CompileTest) Play

func (arg *CompileTest) Play(ctx *runtime.Context) *PlayResult

Play runs the service.

type Eval

type Eval struct {
	KoExpr string `ko:"name=koExpr"`
}

Eval is a service that evaluates a Ko expression.

func (*Eval) Play

func (e *Eval) Play(ctx *runtime.Context) *EvalResult

Play the Eval service.

type EvalResult

type EvalResult struct {
	Eval     *Eval         `ko:"name=eval"`
	Error    error         `ko:"name=error"`
	Returned symbol.Symbol `ko:"name=returned"`
}

EvalResult holds the result of the Eval service.

type GoPrint

type GoPrint struct {
	String []string `ko:"name=string,monadic"`
}

func (*GoPrint) Play

func (p *GoPrint) Play(ctx *runtime.Context) string

type GoPrintln

type GoPrintln struct {
	String []string `ko:"name=string,monadic"`
}

func (*GoPrintln) Play

func (p *GoPrintln) Play(ctx *runtime.Context) string

type Play

type Play struct {
	Pkg     string               `ko:"name=pkg"`  // e.g. github.com/kocircuit/kocircuit/codelab
	Func    string               `ko:"name=func"` // e.g. HelloWorld
	Repo    model.Repo           `ko:"name=repo"` // compiled ko repo
	Faculty eval.Faculty         `ko:"name=faculty"`
	Arg     *symbol.StructSymbol `ko:"name=arg"` // arg can be nil
}

Play is a service that plays a function in a Ko repository.

func (*Play) Play

func (w *Play) Play(ctx *runtime.Context) *PlayResult

Play the function

type PlayFuncEval

type PlayFuncEval struct {
	Func *model.Func          `ko:"name=func"`
	Eval *go_eval.Evaluate    `ko:"name=eval"`
	Arg  *symbol.StructSymbol `ko:"name=arg"` // arg can be nil
}

func (*PlayFuncEval) Play

func (w *PlayFuncEval) Play(ctx *runtime.Context) *PlayResult

type PlayResult

type PlayResult struct {
	Play         *Play         `ko:"name=play"`
	PlayFuncEval *PlayFuncEval `ko:"name=playFuncEval"`
	Returned     symbol.Symbol `ko:"name=returned"`
	Error        error         `ko:"name=error"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL