Skip to content

Types

TYPE := i64 | f64 | bool | str | unit
| list TYPE
| opt TYPE
| res TYPE TYPE
| name (a record type)

Types are written in prefix form with fixed arity, like expressions: res list i64 str is a result holding a list of i64 or a str error.

  • Static typing with bidirectional checking. Function signatures are always explicit; let types are inferred.
  • No implicit conversions, no subtyping, no overloading of user functions.
  • Builtins may be generic (len works on any list T); user functions are monomorphic in v0.1.
type point x:f64 y:f64

The type name is its constructor, with one argument per field (point 1.0 2.0), and .x p reads a field.

dict K V, a JSON value type, sum types with pattern matching, and user generics.