Expand description
Built-in platform services available to Aver programs.
Each service is a named namespace (Args, Console, Http, Disk, Tcp, HttpServer, Time, Env, Random, Terminal) that must
be declared as an effect in order to be called:
fn fetch(url: String) -> Result<HttpResponse, String>
! [Http.get]
Http.get(url)Every service module exposes the same three functions:
register(global)— insert the namespace into the interpreter’s global enveffects(name)— return required effects for a builtin name (or empty)call(name, args)— handle the call, returningNoneif not owned
Pure type namespaces (Int, Float, String, List) live in src/types/ instead.
Functions§
- call
- call_nv
- effects
- register
- Args service — command-line arguments.
- register_
nv