1 \documentstyle[literate]{article}
2 \title{Lazy Imperative Programming}
4 By John Launchbury, though he may not know it.
6 This code describes {\em sequences}, which are independent state-based
7 computations, typically involving (primitive) arrays.
9 It also includes the basic code for Glasgow I/O, which is similar.
11 The ``layers'' here are:
14 ``World'' types; basic state-transformer monad.
16 \item[Seq/IO PrimOps:]
17 The true-blue primitives wired into the compiler.
19 \item[Seq (incl arrays...) and IO monads:]
35 %-----------------------------------------------------
36 % "World" types and odd types for returning
37 % several primitive things
38 \input{PreludeWorld.lhs}
39 \input{SemiPrelude.lhs}
41 %-----------------------------------------------------
42 % State transformer monad
45 %-----------------------------------------------------
47 \input{PreludeGlaInOut.lhs}
48 \input{PreludeGlaIO.lhs}
50 %-----------------------------------------------------
52 \input{PreludeGlaArr.lhs}
53 \input{PreludeGlaArray.lhs}
55 %-----------------------------------------------------
57 \input{PreludeVars.lhs}
59 %-----------------------------------------------------
61 \input{PackedString.lhs}
63 %-----------------------------------------------------
65 \input{PreludeDialogueIO.lhs}
67 %-----------------------------------------------------