The ATS PL System Wiki
Unleashing the potentials of types and templates
Status: Beta
Brought to you by:
ats-hwxi
This page is incomplete, and needs review
Infinitely recursive functions may be a cause for a segfault.
(But sometimes, one may want infinite recursion, as in a main loop; when is it not an issue?) To avoid this possibility, one can take advantage of dependent types and termination metrics, as in this example.
A main loop, useful for creating an application that will keep running until something causes it to return. This can be implemented in several ways.
Firstly,
implement
main () = main() where { ... }
Wiki: Frequently asked questions
Anonymous