Versions in this module Expand all Collapse all v0 v0.8.1 Sep 17, 2026 v0.8.0 Sep 14, 2026 Changes in this version type Checked + Unique bool type Declare + Range Range + type Framed struct + X Expr + func (f Framed) Type() Type type Param + Unique bool type Range + func (r Range) Lower() int64 + type Sample struct + Body Lambda + Dom string + Rng string + Seq Expr + func (s Sample) DomType() Type + func (s Sample) RngType() Type + type Sampled struct + In Expr + S Sample + func (s Sampled) Type() Type v0.7.0 Sep 10, 2026 v0.6.0 Sep 7, 2026 v0.5.1 Sep 5, 2026 v0.5.0 Sep 5, 2026 Changes in this version + const CCompilerEnvVar + const GoCommandEnvVar + var CFlags = []string + var ErrUnsupported = errors.New("not compilable") + var MultAny = Mult + var MultOne = Mult + func Build(p *Program, target Target, output string) error + func EmitC(w io.Writer, p *Program, withMain bool) error + func EmitGo(w io.Writer, p *Program) error + func Source(p *Program, target Target) ([]byte, error) + func SourceExtension(target Target) string + type Arg struct + Param int + Value Expr + type Assign struct + Name string + Range Range + Value Expr + type Binary struct + L Expr + Op ast.OperatorKind + R Expr + T Type + func (b Binary) Type() Type + type BoolLit struct + Value bool + func (BoolLit) Type() Type + type Call struct + Args []Arg + Fn *Func + func (c Call) Type() Type + type Checked struct + M Mult + R Range + Where string + X Expr + func (c Checked) Type() Type + type Coalesce struct + L Expr + R Expr + T Type + func (c Coalesce) Type() Type + type Compiler struct + func New(model *semantics.Model, resolver *resolve.Resolver) *Compiler + func (c *Compiler) Compile(entry *symbols.Symbol) (*Program, error) + type Cond struct + C Expr + Else Expr + T Type + Then Expr + func (c Cond) Type() Type + type Declare struct + Init Expr + Name string + T Type + type Expr interface + Type func() Type + type Fold struct + Body Lambda + Op SeqOp + Seq Expr + T Type + func (f Fold) Type() Type + type ForEach struct + Body []Stmt + Seq Expr + Var string + type Func struct + Body []Stmt + Ident string + Name string + Params []Param + Result Type + ResultRange Range + type If struct + Cond Expr + Else []Stmt + Then []Stmt + type Index struct + I Expr + Seq Expr + func (i Index) Type() Type + type IntLit struct + Value int64 + func (IntLit) Type() Type + type Lambda struct + Body Expr + Params []Param + type Let struct + In Expr + Name string + Value Expr + func (l Let) Type() Type + type LibCall struct + Args []Arg + Op LibOp + func (l LibCall) Type() Type + type LibOp int + const LibAbsInt + const LibAbsReal + const LibArccos + const LibArcsin + const LibArctan + const LibAtan2 + const LibCos + const LibCot + const LibDeg + const LibExp + const LibFloor + const LibIsUnit + const LibIsZero + const LibLn + const LibLog + const LibMaxInt + const LibMaxNatural + const LibMaxReal + const LibMinInt + const LibMinNatural + const LibMinReal + const LibRad + const LibRound + const LibSin + const LibSqrt + const LibTan + func (op LibOp) Operands() []Type + func (op LibOp) Result() Type + func (op LibOp) String() string + type Mult struct + Lower int64 + Upper int64 + func (m Mult) Admits(n int64) bool + type NullLit struct + T Type + func (n NullLit) Type() Type + type Param struct + Mult Mult + Name string + Range Range + Type Type + type Program struct + Collections bool + Entry *Func + Funcs []*Func + type Range int + const RangeAny + const RangeNatural + const RangePositive + func (r Range) String() string + type RangeExpr struct + Hi Expr + Lo Expr + func (RangeExpr) Type() Type + type RealLit struct + Value float64 + func (RealLit) Type() Type + type Return struct + Value Expr + type SeqCall struct + Args []Expr + Op SeqOp + T Type + func (s SeqCall) Type() Type + type SeqEq struct + Ident bool + L Expr + Neq bool + R Expr + func (SeqEq) Type() Type + type SeqLit struct + Elems []Expr + T Type + func (s SeqLit) Type() Type + type SeqOp int + const SeqAllTrue + const SeqAnyTrue + const SeqCollect + const SeqEquals + const SeqExcludes + const SeqExcluding + const SeqExcludingAt + const SeqExists + const SeqForAll + const SeqHead + const SeqIncludes + const SeqIncludesOnly + const SeqIncluding + const SeqIncludingAt + const SeqIntersection + const SeqInvalid + const SeqIsEmpty + const SeqLast + const SeqMaximize + const SeqMinimize + const SeqNotEmpty + const SeqProduct + const SeqReduce + const SeqReject + const SeqSame + const SeqSelect + const SeqSelectOne + const SeqSize + const SeqSubsequence + const SeqSum + const SeqTail + const SeqUnion + func (op SeqOp) Body() int + func (op SeqOp) Name() string + func (op SeqOp) String() string + type Stmt interface + type Target string + const TargetC + const TargetGo + func Targets() []Target + type ToMany struct + X Expr + func (t ToMany) Type() Type + type ToOne struct + Bare bool + Fail string + Other Expr + OtherOne string + Where string + X Expr + func (t ToOne) Type() Type + type ToReal struct + X Expr + func (t ToReal) Type() Type + type Type int + const TypeBool + const TypeInt + const TypeInvalid + const TypeNull + const TypeReal + const TypeSeqBool + const TypeSeqInt + const TypeSeqReal + func (t Type) Elem() Type + func (t Type) Many() bool + func (t Type) Scalar() bool + func (t Type) Seq() Type + func (t Type) String() string + type Unary struct + Op ast.OperatorKind + T Type + X Expr + func (u Unary) Type() Type + type UnsupportedError struct + Calc string + What string + func (e *UnsupportedError) Error() string + func (e *UnsupportedError) Unwrap() error + type Var struct + Name string + T Type + func (v Var) Type() Type + type While struct + Body []Stmt + Cond Expr + Until Expr