Monadic I/O in Haskell 1.3
Andrew D. Gordon
June 5, 1995
We describe the design and use of monadic I/O in Haskell 1.3, the
latest revision of the lazy functional programming language Haskell.
Haskell 1.3 standardises the monadic I/O mechanisms now available in
many Haskell systems. The new facilities allow fairly sophisticated
text-based application programs to be written portably in Haskell.
The standard provides implementors with a flexible framework for
extending Haskell to incorporate new language features. Apart from
the use of monads, the main advances over the previous standard are:
character I/O based on handles (analogous to ANSI C file pointers), an
error handling mechanism, terminal interrupt handling and a POSIX
interface. Apart from a tutorial description of the new facilities we
include a worked example: a derived monad for combinator parsing.