Preface
ATS is a rich programming language equipped with a highly expressive type
system for specifying and enforcing program invariants. In particular, both
dependent and linear types are available in ATS to support practical
programming. ATS/GTK provide an API in ATS for
GTK+,
a comprehensive package for creating graphical user interfaces. While
there are already many on-line tutorials on using GTK+, the current one
focuses on employing types in ATS to facilitate safe and reliable
programming with GTK+. In particular, it is demonstrated concretely here
that linear types can be used effectively to prevent resources (e.g.,
various GTK objects) from being leaked due to programming errors. The
reader of the tutorial is assumed to have already acquired certain level of
familiarity with both ATS and GTK.