1 Overview





2 Types



Lists

datatype list (a:t@ype+, int)

functional (immutable) singly-linked list

dataviewtype list_vt (a:viewt@ype+, int)

linear (mutable?) singly-linked list

References

Arrays

typedef array (a,n) = @[a][n] viewdef array_v (a:viewt@ype, l:addr, n:int) = @[a][n]@l absviewtype arrayptr (a:viewt@ype+, l:addr, n:int) = ptr l abstype arrayref (a:viewt@ype, n:int) = ptr l abstype arrszref (a:viewt@ype) = ptr l

Strings

abstype string = ptr
abstype string (n:int) = string

persistent read-only strings

absviewtype strptr (l:addr) = ptr viewtypedef strptr = [l:addr] strptr l absviewtype strnptr (l:addr, n:int) = ptr
viewtypedef strnptr (n:int) = [l:addr] strnptr (l, n)

linear mutable strings

abstype strref (l:addr) = ptr

persistent mutable strings

Option types