Log of Changes for ATS/Anairiats

In this page, we list some important changes made to ATS/Anairiats. In particular, we report changes made to the grammar of ATS.


  • Date: 2007-09-13

    The sorts for boxed types and viewtypes are introduced. We now use type and viewtype as the sorts for boxed types and viewtypes, respectively. For unboxed types and viewtypes, the sorts are t@ype and viewt@ype, respectively.

    Here are two type definitions for boxed and unboxed pairs of integers:

    stadef int2_box: type = '(int, int) // boxed tuple
    stadef int2_flt: t@ype = @(int, int) // flat tuple
  • Date: 2007-11-25

    For a function declaration, the default function kind is now function (FUNCLOfun) instead of closure (FINCLOclo). For example, The following function declaration assigns foo the type T1 -<fun1> T2:

    fun foo (x: T1): T2 = ...
    We use fun1 to indicate that foo is function potentially of (full) effects.

    In order to assign a closure type to foo, the function kind annoation needs to be supplied as follows:

    fun foo (x: T1):<clo1> T2 = ...
    We use clo1 to indicate that foo is closure potentially of (full) effects.

  • Date: 2007-12-09

    It is now allowed for a constructor associtated with a datatype to carry an argument of a linear type. For instance, the datatype for (persistent) lists is now defined as follows:

    datatype list (a:viewt@ype+, int) =
      | {n:nat} cons (a, n+1) of (a, list (a, n)) | nil (a, 0)
    The length function lists can be implemented as follows:
    fun{a:viewt@ype} length {n:nat} (xs: list (a, n)): int n =
      case+ xs of cons (!x, xs) = 1 + length (xs) | nil () => 0