A Template for Single-File Programs

The following code template, which is available on-line, is designed for constructing a single-file program in ATS:

(* ** ** A template for single-file ATS programs ** *) (* ****** ****** *) // #include "share/atspre_define.hats" #include "share/atspre_staload.hats" // (* ****** ****** *) // // please write your program in this section // (* ****** ****** *) implement main0 () = () // a dummy implementation for [main]

The line starting with the keyword #include enables the ATS compiler atsopt to gain access to certain external library packages and the definitions of various library functions. I will cover elsewhere in the book the topic on making use of library code in ATS.