gluon 0.18.2

A static, type inferred programming language for application embedding
Documentation
let { List } = import! std.list
let { Map } = import! std.map
let { Option } = import! std.option
let { Result } = import! std.result

let { Eff } = import! std.effect
let { State } = import! std.effect.state
let { Error } = import! std.effect.error

rec
type Expr =
    | Atom String
    | Int Int
    | Float Float
    | List (List Expr)
    | Function Function
    | Primitive (forall r . List Expr -> Eff (LispEffect r) Expr)
type Function = {
    params : List String,
    vararg : Option String,
    body : List Expr,
    closure : Map String Expr
}
type LispState = Map String Expr
type LispEffect r a = [| error : Error String, state : State LispState | r |] a
in

{ Expr, Function, LispState, LispEffect }