Commit d6f0eff2 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Many small changes

parent 55ab3432
......@@ -48,13 +48,26 @@ should be
size :: Stack a -> Int
</pre>
<p><li> [July 2001] <strong>Page 12, Section 3, Expressions.</strong>
Replace the last two sentences of the first paragrah of the section by:
<p>
"Free variables and constructors used in these translations always
refer to entities defined by the <tt>Prelude</tt>. For example,
``<tt>concatMap</tt>'' used in the translation of list comprehensions
(Section 3.11) means the <tt>concatMap</tt> defined by the
<tt>Prelude</tt>, regardless of what is in scope where the list
comprehension is used."
<p>
(Clarification only.)
<p><li> [Apr 2001] <strong>Page 14, Section 3.1, Errors.</strong> In the first sentence of
the section, after "indistinguishable" add "by a Haskell program".
<p><li> [Apr 2001] <strong>Page 20, Section 3.10, Arithmetic sequences.</strong>
<p><li> [July 2001] <strong>Page 20, Section 3.10, Arithmetic sequences.</strong>
In the second paragraph, in the sentence "For the type <tt>Integer</tt>,
arithmetic sequences have the following meaning...", replace "<tt>Integer</tt>"
with "<tt>Int</tt>".
arithmetic sequences have the following meaning...", replace "type <tt>Integer</tt>"
with "types <tt>Int</tt> and <tt>Integer</tt>". Remove <tt>Integer</tt> from the
list in the paragraph following the bulletted list.
<p><li> [Apr 2001] <strong>Page 21, Section 3.11, List Comprehensions; and Page 128.</strong>
<ul> <li> In the production for "aexp", change the "n >= 0" to "n >= 1".
......@@ -158,12 +171,48 @@ is affected by module boundaries."
<p>
This footnote qualifies the otherwise over-strong statement.
<p><li> <strong>Page 66, Section 5.3, Import Declarations, numbered item 2.</strong>
Start a new paragraph before the sentence "The hiding clause only applies to unqualified
names...".
<p><li> [July 2001] <strong>Page 65, Section 5.2, Export declarations.</strong>
Replace the two paragraphs and code fragment that the numbered list with the following:
<p>
"It makes no difference to an importing module how an entity was
exported. For example, a field name <tt>f</tt> from data type <tt>T</tt> may be exported individually
(<tt>f</tt>, item (1) above); or as an explicitly-named member of its data type (<tt>T(f)</tt>, item (2));
or as an implicitly-named member (<tt>T(..)</tt> item(2)); or by exporting an entire
module (<tt>module M</tt>, item (5) or (6)).
<p>
The <em>unqualified</em> names of the entities exported by a module must all be distinct
(within their respective namespace). For example
<pre>
module A ( module B, C.f, g ) where -- an invalid module
import qualified B(f,g)
import qualified C(f)
g = True
</pre>
There are name clashes in the export list between <tt>B.f</tt> and <tt>C.f</tt> and
between <tt>g</tt> and <tt>B.g</tt> even though there are no name clashes within
module <tt>A</tt>."
<p><li> [July 2001] <strong>Page 65, Section 5.3, Import Declarations, last line.</strong>
Start a new subsection "5.3.1 What is imported" before "Exactly which entities are to
be imported...".
<p><li> [July 2001] <strong>Page 66, Section 5.3, Import Declarations, numbered item 2.</strong>
Delete the two sentences "The hiding clause only applies to unqualified
names... A hiding clause has no effect....".
<p><li> [July 2001] <strong>Page 66, Section 5.3.1, Qualified Import.</strong> [This section
becomes 5.3.2.] Replace the first sentence with:
"For each entity imported under the rules of Section 5.3.1
the top-level environment is extended. If the import declaration used
the <tt>qualified</tt> keyword, only the qualified name of the entity is
brought into scope. If the <tt>qualified</tt> keyword is omitted, then both the
qualified and unqualified name of the entity is brought into scope.
Section 5.5.1 describes qualified names in more detail."
<p><li><strong>Page 67, Section 5.3.2, Local aliases</strong>.
The the last example in the section should read:
The last example in the section should read:
<pre>
import Foo as A(f)
</pre>
......@@ -217,14 +266,14 @@ Replace the first paragraph of this section with:
"Tuples are algebraic datatypes with special syntax, as defined
in Section 3.8. Each tuple type has a single constructor.
All tuples are instances of <tt>Eq</tt>, <tt>Ord</tt>, <tt>Bounded</tt>, <tt>Read</tt>,
<tt>Show</tt>, and <tt>Ix</tt> (provided, of course, that all their component types are).
<tt>Show</tt> (provided, of course, that all their component types are).
<p>
There is no upper bound on the size of a tuple, but some Haskell
implementations may restrict the size of tuples, and limit the
instances associated with larger tuples. However, every Haskell
implementation must support tuples up to size 15, together with their instances
for <tt>Eq</tt>, <tt>Ord</tt>, <tt>Bounded</tt>, <tt>Read</tt>,
<tt>Show</tt>, and <tt>Ix</tt>. The Prelude and
and <tt>Show</tt>. The Prelude and
libraries define tuple functions such as <tt>zip</tt> for tuples up to a size
of 7."
......@@ -237,6 +286,16 @@ There is a formatting error in the example. There should be a new line
after "the declaration of Class Eq is:", and before the sentence beginning
"This declaration gives default method declarations...".
<p><li> [July 2001] <strong>Page 78, Section 6.3.2, The Ord Class.</strong>
Redefine the default methods for <tt>max</tt> and <tt>min</tt> as follows:
<pre>
max x y | x <= y = y
| otherwise = x
min x y | x <= y = x
| otherwise = y
</pre>
(This change aligns the report with the code given in the Appendix.)
<p><li> [Apr 2001] <strong>Page 78, Section 6.3.3, The Read and Show Classes.</strong>
After "The <tt>Read</tt> and <tt>Show</tt> classes are used to convert values
to and from strings." add the sentence:
......@@ -249,6 +308,9 @@ Right at the bottom of the page, replace "However, for IO, the fail
method invokes error." by "For IO, the fail method raises a user
exception in the IO monad (see Section 7.3)."
<p><li> [July 2001] <strong>Page 83, Section 6.4.2, Arithmetic and number-theoretic operations.</strong>
After "The quod, rem, div, and mod class methods satisfy these laws" add "if <tt>y</tt> is non-zero".
<p><li> [Apr 2001] <strong>Page 84, Section 6.4, Fig 7; and bottom of page 86, Section 6.4.6.</strong>
<pre>
fromRealFrac :: (RealFrac a, Fractional b) => a -> b
......@@ -258,6 +320,11 @@ should be replaced by
realToFrac :: (Real a, Fractional b) => a -> b
</pre>
<p><li><strong>Page 88, Section 7.1, Standard I/O functions.</strong>
In the section "Input functions" replace "the <tt>IOError</tt> value associated
with end-of-file is defined in a library" by "a predicate <tt>isEOFError</tt> that
identifies this exception is defined in the <tt>IO</tt> library".
<p><li><strong>Page 90, Section 7.3, Exception handling in the IO monad.</strong>
After the first paragraph give the following type signature:
<pre>
......@@ -379,7 +446,7 @@ In numbered item 3, replace
In the displayed equation starting <tt>fst (head (...)) == x</tt>, replace "<tt>r</tt>" by
the empty string, resulting in the following:
<pre>
fst (head (readsPrec d (showsPrec d x ""))) == x
head (readsPrec d (showsPrec d x "")) == (x,"")
</pre>
(The old, stronger, equation is simply false.)
......@@ -425,6 +492,18 @@ Replace the definition of <tt>recip</tt> on line 3 by the following
The effect of this change is to use the "smart constructor", <tt>%</tt>, instead
doing it by hand. In particular, an error will be raised if y is zero.
<p><li> [July 2001] <strong>Page 13, Section 4.1, Numeric library</strong>.
<ul> <li> In the definition of <tt>formatRealFloat</tt>,
<li> in the definition of <tt>doFmt</tt>,
<li> in the <tt>FFFixed</tt> branch of "<tt>case fmt of ...</tt>",
<li> in the <tt>Nothing</tt> branch of "<tt>case decs of ...</tt>",
<li> replace the entire branch "<tt>Nothing -> ...</tt>" with
<pre>
Nothing | e >= 0 -> take e (ds ++ repeat '0') ++ "." ++ mk0 (drop e ds)
| otherwise -> "0." ++ replicate (-e) '0' ++ ds
</pre>
</ul>
<p><li> <strong>Page 17, Section 5, first text line</strong>. Replace "continuous" by "contiguous".
<p><li> [May 2001] <strong>Page 17, Section 5, Indexing operations</strong>.
......@@ -469,6 +548,21 @@ class declaration, and the <tt>rangeSize</tt> declaration, with:
(Note: the comment has changed too; it was misleading before.)
</ul>
<p><li> [July 2001] <strong>Page 17, Section 5.1, Derived instances of <tt>Ix</tt></strong>.
Replace the first paragraph with the following:
<p>
"It is possible to derive an instance of <tt>Ix</tt> automatically, using
a <tt>deriving</tt> clause on a <tt>data</tt> declaration (Section 4.3.3
of the Language Report).
Such derived instance declarations for the class <tt>Ix</tt> are only possible
for enumerations (i.e. datatypes having
only nullary constructors) and single-constructor datatypes,
whose constituent types are instances of <tt>Ix</tt>. A Haskell implementation
must provide <tt>Ix</tt> instances for tuples up to at least size 15."
<p>
[This change just clarifies, and propagates the "instances up to size 15" change from
Section 6.1.6 of the Language Report.]
<p><li> [May 2001] <strong>Page 24, Section 6.6</strong>.
Add <tt>Eq a</tt> to the context for <tt>instance Eq (Array a b)</tt>, thus:
<pre>
......
......@@ -170,13 +170,8 @@ formatRealFloat fmt decs x = s
in d:'.':ds ++ "e" ++ show (e-1+ei)
FFFixed ->
case decs of
Nothing ->
let f 0 s ds = mk0 s ++ "." ++ mk0 ds
f n s "" = f (n-1) (s++"0") ""
f n s (d:ds) = f (n-1) (s++[d]) ds
mk0 "" = "0"
mk0 s = s
in f e "" ds
Nothing | e >= 0 -> take e (ds ++ repeat '0') ++ "." ++ mk0 (drop e ds)
| otherwise -> "0." ++ replicate (-e) '0' ++ ds
Just dec ->
let dec' = max dec 0 in
if e >= 0 then
......
......@@ -7,8 +7,33 @@
<img src="h98-libs.gif" alt="Haskell 98 Libraries">
<h3 align="center">Standard Libraries for Haskell 98</h3>
<h3 align="center">Revised: June 2001</h3>
<h3 align="center">Revised: July 2001</h3>
</div>
<hr>
<h3>Table of Contents</h3>
<ul>
<li><a href="libindex.html">Full Table of Contents</a>
<li><a href="introduction.html">Introduction</a>
<li><a href="ratio.html">Ratio</a>
<li><a href="complex.html">Complex</a>
<li><a href="numeric.html">Numeric</a>
<li><a href="ix.html">Ix</a>
<li><a href="array.html">Array</a>
<li><a href="list.html">List</a>
<li><a href="maybe.html">Maybe</a>
<li><a href="char.html">Char</a>
<li><a href="monad.html">Monad</a>
<li><a href="io.html">IO</a>
<li><a href="directory.html">Directory</a>
<li><a href="system.html">System</a>
<li><a href="time.html">Time</a>
<li><a href="locale.html">Locale</a>
<li><a href="cputime.html">CPUTime</a>
<li><a href="random.html">Random</a>
</ul>
<hr>
<div align=center>
<a href="http://research.microsoft.com/Users/simonpj">
Simon Peyton Jones</a> [editor], Microsoft Research, Cambridge <br>
<a href="http://www.cs.chalmers.se/~rjmh">
......@@ -46,28 +71,7 @@ Colin Runciman</a>, York University <br>
<a href="http://cm.bell-labs.com/cm/cs/who/wadler/">
Philip Wadler</a>, Avaya Labs <br>
</div>
<hr>
Contents:
<ul>
<li><a href="libindex.html">Full Table of Contents</a>
<li><a href="introduction.html">Introduction</a>
<li><a href="ratio.html">Ratio</a>
<li><a href="complex.html">Complex</a>
<li><a href="numeric.html">Numeric</a>
<li><a href="ix.html">Ix</a>
<li><a href="array.html">Array</a>
<li><a href="list.html">List</a>
<li><a href="maybe.html">Maybe</a>
<li><a href="char.html">Char</a>
<li><a href="monad.html">Monad</a>
<li><a href="io.html">IO</a>
<li><a href="directory.html">Directory</a>
<li><a href="system.html">System</a>
<li><a href="time.html">Time</a>
<li><a href="locale.html">Locale</a>
<li><a href="cputime.html">CPUTime</a>
<li><a href="random.html">Random</a>
</ul>
<p>
Copyright (c) Simon Peyton Jones and John Hughes.
<br>
......
......@@ -22,7 +22,7 @@ can be found on the web at @http://haskell.org@.
Both Haskell 98 Reports were revised in April 2001, to incorporate
dozens of typographical errors and presentational improvements. A
complete list of all changes can be found at @http:://haskell.org@.
complete list of all changes can be found at @http://haskell.org@.
\subsection*{Acknowledgements}
......
......@@ -34,11 +34,15 @@ operations:
\subsection{Deriving Instances of @Ix@}
\index{Ix@@{\tt Ix}!derived instance}
Derived instance declarations for the class @Ix@ are only possible
It is possible to derive an instance of @Ix@ automatically, using
a @deriving@ clause on a @data@ declaration (Section~4.3.3
of the Language Report).
Such derived instance declarations for the class @Ix@ are only possible
for enumerations\index{enumeration} (i.e.~datatypes having
only nullary constructors) and single-constructor datatypes,
including arbitrarily large tuples, whose constituent types are
instances of @Ix@.
whose constituent types are instances of @Ix@. A Haskell implementation
must provide @Ix@ instances for tuples up to at least size 15.
\begin{itemize}
\item
For an {\em enumeration}, the nullary constructors are assumed to be
......
%
% $Header: /home/cvs/root/haskell-report/libraries/library.verb,v 1.4 2001/06/18 09:52:43 simonpj Exp $
% $Header: /home/cvs/root/haskell-report/libraries/library.verb,v 1.5 2001/08/14 07:48:24 simonpj Exp $
%
% NOTE:--------------------------------------------------------------
% The formatting of this report and the ``new font selection scheme''
......@@ -412,7 +412,7 @@
{\Large\bf for the} \\[.1in]
{\huge\bf Haskell 98} \\[.3in]
{\LARGE\bf Programming Language} \\[.3in]
{\large\bf Revised: June 2001}
{\large\bf Revised: July 2001}
\end{center}
\vspace{.15in}
......@@ -423,7 +423,7 @@ Lennart Augustsson$^9$ & Dave Barton$^7$ \\
Brian Boutel$^4$ & Warren Burton$^5$ \\
Joseph Fasel$^6$ & Kevin Hammond$^2$ \\
Ralf Hinze$^{12}$ & Paul Hudak$^1$ \\
Thomas Johnsson$^3$ & Mark Jones$^14$ \\
Thomas Johnsson$^3$ & Mark Jones$^{14}$ \\
John Launchbury$^{14}$ & Erik Meijer$^{10}$ \\
John Peterson$^1$ & Alastair Reid$^{15}$ \\
Colin Runciman$^{13}$ & Philip Wadler$^{11}$
......
......@@ -86,10 +86,10 @@ class (Eq a) => Ord a where
-- note that (min x y, max x y) = (x,y) or (y,x)
max x y
| x >= y = x
| otherwise = y
| x <= y = y
| otherwise = x
min x y
| x < y = x
| x <= y = x
| otherwise = y
-- Enumeration and Bounded classes
......
%
% $Header: /home/cvs/root/haskell-report/report/basic.verb,v 1.5 2001/06/18 09:52:43 simonpj Exp $
% $Header: /home/cvs/root/haskell-report/report/basic.verb,v 1.6 2001/08/14 07:48:24 simonpj Exp $
%
%**<title>The Haskell 98 Report: Basic Types and Classes</title>
%*section 6
......@@ -116,13 +116,13 @@ respectively. Lists are an instance of classes @Read@, @Show@, @Eq@, @Ord@,
Tuples are algebraic datatypes with special syntax, as defined
in Section~\ref{tuples}. Each tuple type has a single constructor.
All tuples are instances of @Eq@, @Ord@, @Bounded@, @Read@,
@Show@, and @Ix@ (provided, of course, that all their component types are).
and @Show@ (provided, of course, that all their component types are).
There is no upper bound on the size of a tuple, but some \Haskell{}
implementations may restrict the size of tuples, and limit the
instances associated with larger tuples. However, every Haskell
implementation must support tuples up to size 15, together with the instances
for @Eq@, @Ord@, @Bounded@, @Read@, @Show@, and @Ix@. The Prelude and
for @Eq@, @Ord@, @Bounded@, @Read@, and @Show@. The Prelude and
libraries define tuple functions such as @zip@ for tuples up to a size
of 7.
......@@ -330,21 +330,20 @@ constituents are also instances of @Eq@.
(<), (<=), (>=), (>) :: a -> a -> Bool
max, min :: a -> a -> a
compare x y
| x == y = EQ
| x <= y = LT
| otherwise = GT
compare x y | x == y = EQ
| x <= y = LT
| otherwise = GT
x <= y = compare x y /= GT
x < y = compare x y == LT
x >= y = compare x y /= LT
x > y = compare x y == GT
x <= y = compare x y /= GT
x < y = compare x y == LT
x >= y = compare x y /= LT
x > y = compare x y == GT
-- note that (min x y, max x y) = (x,y) or (y,x)
max x y | x >= y = x
| otherwise = y
min x y | x < y = x
| otherwise = y
-- Note that (min x y, max x y) = (x,y) or (y,x)
max x y | x <= y = y
| otherwise = x
min x y | x <= y = x
| otherwise = y
@
\eprog
The @Ord@ class is used for totally ordered datatypes. All basic
......@@ -626,7 +625,7 @@ Prelude do not
conform to current language independent arithmetic (LIA) standards. These
standards require considerably more complexity in the numeric
structure and have thus been relegated to a library. Some, but not
all, aspects of the IEEE standard floating point standard have been
all, aspects of the IEEE floating point standard have been
accounted for in class @RealFloat@.
The standard numeric types are listed in Table~\ref{standard-numeric-types}.
......@@ -824,7 +823,7 @@ section~\ref{operators}) apply to all numbers. The class methods
@(/)@
\indextt{/}
applies only to fractional ones. The @quot@, @rem@,
@div@, and @mod@ class methods satisfy these laws:
@div@, and @mod@ class methods satisfy these laws if @y@ is non-zero:
\[\ba{c}
@(x @\bkqB@quot@\bkqA@ y)*y + (x @\bkqB@rem@\bkqA@ y) == x@\\
@(x @\bkqB@div@\bkqA@ y)*y + (x @\bkqB@mod@\bkqA@ y) == x@
......
%
% $Header: /home/cvs/root/haskell-report/report/decls.verb,v 1.3 2001/06/18 09:52:43 simonpj Exp $
% $Header: /home/cvs/root/haskell-report/report/decls.verb,v 1.4 2001/08/14 07:48:24 simonpj Exp $
%
%**<title>The Haskell 98 Report: Declarations</title>
%*section 4
......@@ -37,7 +37,7 @@ decl -> gendecl
cdecls -> @{@ cdecl_1 @;@ ... @;@ cdecl_n @}@ & \qquad (n>=0)
cdecl -> gendecl
| (funlhs | car) rhs
| (funlhs | var) rhs
idecls -> @{@ idecl_1 @;@ ... @;@ idecl_n @}@ & \qquad (n>=0)
idecl -> (funlhs | qfunlhs | var | qvar) rhs
......@@ -410,9 +410,10 @@ an instance of a class only via the presence of an
@instance@ declaration or a @deriving@ clause).
Types are related by a generalization order
\index{generalization order}
\index{generalization preorder}
(specified below);
the most general type that can be assigned to a particular
the most general type, up to the equivalence induced by the generalisation preorder,
that can be assigned to a particular
expression (in a given environment) is called its {\em
principal type}.
\index{principal type}
......@@ -679,7 +680,7 @@ is not. Similarly, @type Rec a = [Rec a]@ is not allowed.
Type synonyms are a strictly syntactic mechanism to make type
signatures more readable. A synonym and its definition are completely
interchangeable.
interchangeable, except in the instance type of an @instance@ declaration (Section~\ref{instance-decls}).
\subsubsection{Datatype Renamings}
\index{newtype declaration@@{\tt newtype} declaration}
......@@ -937,11 +938,13 @@ An {\em instance declaration} introduces an instance of a class. Let
be a @class@ declaration. The general form of the corresponding
instance declaration is:
\[ "@instance@ cx' @=>@ C (T u_1 ... u_k) @where@ @{@ d @}@" \]
where "k\geq0" and "T" is not a type synonym.
\index{type synonym}
The constructor being instanced, "(T u_1 ... u_k)", is
a type constructor applied to simple type variables "u_1, ... u_k",
which must be distinct. This prohibits instance declarations
where "k\geq0".
The type "(T u_1 ... u_k)" must take the form of
a type constructor "T" applied to simple type variables "u_1, ... u_k";
furthermore, "T" must not be a type synonym\index{type synonym},
and the "u_i" must all be distinct.
This prohibits instance declarations
such as:
\bprog
@
......
%
% $Header: /home/cvs/root/haskell-report/report/derived.verb,v 1.5 2001/06/18 09:52:43 simonpj Exp $
% $Header: /home/cvs/root/haskell-report/report/derived.verb,v 1.6 2001/08/14 07:48:24 simonpj Exp $
%
% The paragraph describing the formats of standard representations might
% be deleted, since the info is already in the Prelude.
......@@ -265,7 +265,7 @@ If there is no successful parse, the returned list is empty.
It should be the case that
\bprog
@
fst (head (readsPrec d (showsPrec d x ""))) == x
head (readsPrec d (showsPrec d x "")) == (x,"")
@
\eprog
That is, @readsPrec@ should be able to parse the string produced
......
%
% $Header: /home/cvs/root/haskell-report/report/exps.verb,v 1.3 2001/06/18 09:52:43 simonpj Exp $
% $Header: /home/cvs/root/haskell-report/report/exps.verb,v 1.4 2001/08/14 07:48:25 simonpj Exp $
%
%*section 3
%**<title>The Haskell 98 Report: Expressions</title>
......@@ -20,6 +20,13 @@ we use @True@ instead of
@Prelude.True@ or @map@ instead of @Prelude.map@. (@Prelude.True@ is a
"qualified name" as described in Section~\ref{import}.)
Free variables and constructors used in these translations
always refer to entities defined by the @Prelude@.
For example, ``@concatMap@'' used in the translation of list comprehensions
(Section~\ref{list-comprehensions})
means the @concatMap@ defined by the @Prelude@, regardless of what is in scope
where the list comprehension is used.
In the syntax that follows, there are some families of nonterminals
indexed by precedence levels (written as a superscript). Similarly, the
nonterminals "op", "varop", and "conop" may have a double index:
......@@ -606,7 +613,7 @@ on the instance declaration for the type "t". We give here the
semantics for @Prelude@ types, and indications of the expected semantics
for other, user-defined, types.
For the type @Int@, arithmetic sequences have the following
For the types @Int@ and @Integer@, arithmetic sequences have the following
meaning:
\begin{itemize}
\item The sequence "@[@e_1@..]@" is the list "@[@e_1@,@e_1+1@,@e_1+2@,@...@]@".
......@@ -627,7 +634,7 @@ If the increment is negative, the list terminates when the next element would
be less than "e_3"; the list is empty if "e1 < e_3".
\end{itemize}
For other {\em discrete} @Prelude@ types "t" that
are instances of @Enum@, namely @()@, @Bool@, @Char@ and @Ordering@, and @Integer@,
are instances of @Enum@, namely @()@, @Bool@, @Char@ and @Ordering@,
the semantics is given by mapping the "e_i" to @Int@ using @fromEnum@,
using the above rules, and then mapping back to "t" with @toEnum@.
......@@ -706,14 +713,14 @@ used as a translation into the kernel:
\begin{center}
\bt{lcl}%
\struthack{17pt}%
"@[ @ e@ | True ]@" & = & @[@e@]@ \\
"@[ @ e@ | @q@ ]@" & = & @[ @ e@ | @q@, True ]@ \\
"@[ @ e@ | True ]@" & = & "@[@e@]@" \\
"@[ @ e@ | @q@ ]@" & = & "@[@~ e~@|@~q@, True ]@" \\
"@[ @ e@ | @b@,@~ Q ~@]@" & = &
"@if@~b~@then@~@[ @ e@ | @Q@ ]@~@else []@" \\
"@[ @ e@ | @p @<-@ l@,@~ Q@ ]@" & = &
"@let ok@~p~@=@~@[ @ e@ | @Q@ ]@" \\
&& @ ok _ = []@ \\
&& @in concatMap ok l@ \\
&& "@in concatMap ok@~ l" \\
"@[ @ e@ | let@~decls@,@~ Q@ ]@" & = &
"@let@~decls~@in@~@[ @ e@ | @Q@ ]@"
\et
......
%
% $Header: /home/cvs/root/haskell-report/report/haskell.verb,v 1.4 2001/06/18 09:52:43 simonpj Exp $
% $Header: /home/cvs/root/haskell-report/report/haskell.verb,v 1.5 2001/08/14 07:48:25 simonpj Exp $
%
% NOTE:--------------------------------------------------------------
......@@ -426,7 +426,7 @@
{\LARGE\bf Programming Language} \\[.3in]
{\huge\bf Haskell 98} \\[.3in]
{\Large\bf A Non-strict, Purely Functional Language} \\[.3in]
{\large\bf Revised: June 2001}
{\large\bf Revised: July 2001}
\end{center}
\vspace{.15in}
\begin{center} \large
......@@ -436,7 +436,7 @@ Lennart Augustsson$^9$ & Dave Barton$^7$ \\
Brian Boutel$^4$ & Warren Burton$^5$ \\
Joseph Fasel$^6$ & Kevin Hammond$^2$ \\
Ralf Hinze$^{12}$ & Paul Hudak$^1$ \\
Thomas Johnsson$^3$ & Mark Jones$^14$ \\
Thomas Johnsson$^3$ & Mark Jones$^{14}$ \\
John Launchbury$^{14}$ & Erik Meijer$^{10}$ \\
John Peterson$^1$ & Alastair Reid$^{15}$ \\
Colin Runciman$^{13}$ & Philip Wadler$^{11}$
......
......@@ -5,8 +5,30 @@
<img src="h98.gif" alt="Haskell 98">
<h3>Haskell 98: A Non-strict, Purely Functional Language</h3>
<h3 align="center">Revised: June 2001</h3>
<h3 align="center">Revised: July 2001</h3>
</div>
<hr>
<h3>Brief Table of Contents</h3>
<ul>
<li><a href="index98.html">Full Table of Contents</a>
<li><a href="preface-13.html">Preface</a>
<li><a href="intro.html">Introduction</a>
<li><a href="lexemes.html">Lexical Structure</a>
<li><a href="exps.html">Expressions</a>
<li><a href="decls.html">Declarations and Bindings</a>
<li><a href="modules.html">Modules</a>
<li><a href="basic.html">Basic Types</a>
<li><a href="io-13.html">Input/Output</a>
<li><a href="standard-prelude.html">Standard Prelude</a>
<li><a href="syntax-iso.html">Syntax</a>
<li><a href="literate.html">Literate Comments</a>
<li><a href="derived.html">Derived Instances</a>
<li><a href="pragmas.html">Pragmas</a>
<li><a href="haskell.html">Bibliography</a>
<li><a href="prelude-index.html">Index of Prelude Functions and Types</a>
</ul>
<hr>
<div align=center>
<a href="http://research.microsoft.com/Users/simonpj">
Simon Peyton Jones</a> [editor], Microsoft Research, Cambridge <br>
<a href="http://www.cs.chalmers.se/~rjmh">
......@@ -44,26 +66,6 @@ Colin Runciman</a>, York University <br>
<a href="http://cm.bell-labs.com/cm/cs/who/wadler/">
Philip Wadler</a>, Avaya Labs <br>
</div>
<hr>
Brief Table of Contents.
<ul>
<li><a href="index98.html">Full Table of Contents</a>
<li><a href="preface-13.html">Preface</a>
<li><a href="intro.html">Introduction</a>
<li><a href="lexemes.html">Lexical Structure</a>
<li><a href="exps.html">Expressions</a>
<li><a href="decls.html">Declarations and Bindings</a>
<li><a href="modules.html">Modules</a>
<li><a href="basic.html">Basic Types</a>
<li><a href="io-13.html">Input/Output</a>
<li><a href="standard-prelude.html">Standard Prelude</a>
<li><a href="syntax-iso.html">Syntax</a>
<li><a href="literate.html">Literate Comments</a>
<li><a href="derived.html">Derived Instances</a>
<li><a href="pragmas.html">Pragmas</a>
<li><a href="haskell.html">Bibliography</a>
<li><a href="prelude-index.html">Index of Prelude Functions and Types</a>
</ul>
<p>
Copyright (c) Simon Peyton Jones and John Hughes.
<br>
......
......@@ -37,7 +37,7 @@ mentioned above. Some operations are primitive actions,
corresponding to conventional I/O operations. Special operations
(methods in the class @Monad@, see Section~\ref{monad-class})
sequentially compose actions,
corresponding to sequencing operators (such as the semi-colon) in imperative
corresponding to sequencing operators (such as the semicolon) in imperative
languages.
\subsection{Standard I/O Functions}
......@@ -101,8 +101,8 @@ readLn :: Read a => IO a
\indextt{getChar}%
\indextt{getLine}%
\indextt{getContents}%
Both @getChar@ and @getLine@ raise an exception on end-of-file; the
@IOError@ value associated with end-of-file is defined in a library.
Both @getChar@ and @getLine@ raise an exception on end-of-file; a
predicate @isEOFError@ that identifies this exception is defined in the @IO@ library.
The @getContents@ operation returns all user input as a single
string, which is read lazily as it is needed. The @interact@
function takes a function of type
......
%
% $Header: /home/cvs/root/haskell-report/report/lexemes.verb,v 1.2 2001/05/29 15:40:00 simonpj Exp $
% $Header: /home/cvs/root/haskell-report/report/lexemes.verb,v 1.3 2001/08/14 07:48:25 simonpj Exp $