Other Utilities

I will only briefly mention the remaining sections of the SML/NJ utilities library.

Parsing HTML

The HTML directory contains a parser for HTML. It follows version 3.2 of HTML fairly strictly. It won't cope with non-standard tags and attributes the way a browser would. In a program it might be useful for reading and displaying help files or on-line documentation. Such files could be trusted to use a restricted safe form of HTML. There is a test-parser.sml source file which demonstrates using the parser. For debugging, there is a pretty-printer for the parsed HTML.

INet

The INet directory contains some utility functions for handling sockets. These utilities aren't written for a CML environment so I didn't use them in the web server.

Pretty-Printing

Pretty-printing means formatting a data structure such as a tree ready to print to a file. The formatting can involve indenting to show structure and styles such as a bold font or colour where possible. A pretty-printer is important in a compiler to format an expression into an error message. You might find similar uses for it in your applications.

The pretty-printer is in the PP source directory. The formatter is generic over different kinds of "output device". For example there is an output device for producing HTML. The tests directory contains some example code.

Reactive

The Reactive directory contains a fragment of a system for implementing a reactive programming language. The README says it all.

Unix

The Unix directory contains some minor functions for manipulating Unix environment variable lists and directory path lists. The environment variable functions could be useful when building the environment for a child process.