parameters

sparameter:=
csyntax | declarator

C style function paramaters like int x mean the same as x:int

functions | sparam_qual NAME : sarrow
functions | sparam_qual NAME

If the type is elided, a fresh type variable is used.

sparameter_comma_list:=
functions | epsilon
functions | sparameter ( , sparameter)*
sparam_qual:=
functions | valPVal
functions | varPVar
functions | refPRef
functions | funPFun
functions | epsilonPVal

Parameter qualifiers have the following meaning:

val
The default: Pass by name or value, may be inlined (lazy evaluation), and maybe not.
var
Pass by value, assign to local variable (eager evaluation, copying).
ref
Enforced Lazy evaluation. Pass a pointer to the specified type by value. Automatically dereferenced in function body. Caller will usually explicitly take address, eg &x.
fun
Enforced Lazy evaluation. Pass a closure of a function of unit argument returning the specified value. Automatically called in function body. Caller will usually explicitly wrap, eg { 42 }.