[project @ 1996-01-08 20:28:12 by partain]
[ghc-hetmet.git] / ghc / lib / glaExts / lazyimp.lit
1 \documentstyle[literate]{article}
2 \title{Lazy Imperative Programming}
3 \begin{document}
4 By John Launchbury, though he may not know it.
5
6 This code describes {\em sequences}, which are independent state-based
7 computations, typically involving (primitive) arrays.
8
9 It also includes the basic code for Glasgow I/O, which is similar.
10
11 The ``layers'' here are:
12 \begin{description}
13 \item[Bottom:]
14 ``World'' types; basic state-transformer monad.
15
16 \item[Seq/IO PrimOps:]
17 The true-blue primitives wired into the compiler.
18
19 \item[Seq (incl arrays...) and IO monads:]
20 Built on the above.
21
22 \item[Variables:]
23 Built on Seq.
24
25 \item[PackedStrings:]
26 Built on Seq.
27
28 \item[DialogueIO:]
29 Built on IO.
30
31 \item[MainIO:]
32 Built on DialogueIO.
33 \end{description}
34
35 %-----------------------------------------------------
36 % "World" types and odd types for returning
37 % several primitive things
38 \input{PreludeWorld.lhs}
39 \input{SemiPrelude.lhs}
40
41 %-----------------------------------------------------
42 % State transformer monad
43 \input{PreludeST.lhs}
44
45 %-----------------------------------------------------
46 % basic Glasgow IO
47 \input{PreludeGlaInOut.lhs}
48 \input{PreludeGlaIO.lhs}
49
50 %-----------------------------------------------------
51 % Seq/array stuff
52 \input{PreludeGlaArr.lhs}
53 \input{PreludeGlaArray.lhs}
54
55 %-----------------------------------------------------
56 % Variables
57 \input{PreludeVars.lhs}
58
59 %-----------------------------------------------------
60 % PackedString
61 \input{PackedString.lhs}
62
63 %-----------------------------------------------------
64 % DialogueIO
65 \input{PreludeDialogueIO.lhs}
66
67 %-----------------------------------------------------
68 % MainIO
69 \input{MainIO.lhs}
70 \end{document}