A Tutorial on Programming Features in ATS

Hongwei Xi

0.0.1

Table of Contents
Preface
I. Basic Tutorial Topics
Syntax-Coloring for ATS code
Filename Extensions
File Inclusion inside ATS Code
Fixity Declarations
The Program Entry Point: mainats
Tail-Recursive Call Optimization
Mutual Tail-Recursion
Metrics for Termination Verification
Primitive Recursion
General Recursion
Mutual Recursion
Termination Checking at Run-time
Higher-Order Functions
Parametric Polymorphism
Printf-like Functions
Functional Lists
Persistent Arrays
Persistent References
Call-by-Reference
Lazy Evaluation
II. Advanced Tutorial Topics
Cast Functions
Stack Allocation at Run-Time