Commit 2331e003 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Simon

parent f9e974ec
......@@ -222,7 +222,7 @@ All tuples are instances of <tt>Eq</tt>, <tt>Ord</tt>, <tt>Bounded</tt>, <tt>Rea
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 7, and their instances
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
libraries define tuple functions such as <tt>zip</tt> for tuples up to a size
......@@ -375,6 +375,14 @@ In numbered item 3, replace
``(all constructors must by nullary)'' with
``(all constructors must be nullary)''.
<p><li> [June 2001] <strong>Page 134, Appendix D.4, Derived instances of Read and Show</strong>.
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
</pre>
(The old, stronger, equation is simply false.)
<p><li> [Apr 2001] <strong>Page 141, Bibliograpy</strong>.
Citation [4] should read "JR Hindley".
......@@ -499,18 +507,6 @@ In some cases, <tt>unfoldr</tt> can undo a <tt>foldr</tt> operation:"
<p>
(Followed by the existing displayed equation.)
<p><li> [May 2001] <strong>Page 32, Section 7.8, Library List</strong>.
<ul> <li> Add <tt>deleteFirstsBy</tt> to the export list. (It has always
been in the library, but the report failed to export it!)
<li> Generalise the type signatures of <tt>deleteBy</tt> and <tt>deleteFirstsBy</tt> to:
<pre>
deleteBy :: (x -> a -> Bool) -> x -> [a] -> [a]
deleteFirstsBy :: (x -> a -> Bool) -> [a] -> [x] -> [a]
</pre>
The definitions have these more general types, and they are occasionally useful.
</ul>
<p><li> [Apr 2001] <strong>Page 34, Section 7.8, Library List</strong>.
Replace the definition of <tt>partition</tt> by
<pre>
......
......@@ -55,14 +55,14 @@ nubBy eq (x:xs) = x : nubBy eq (filter (\y -> not (eq x y)) xs)
delete :: Eq a => a -> [a] -> [a]
delete = deleteBy (==)
deleteBy :: (x -> a -> Bool) -> x -> [a] -> [a]
deleteBy :: (a -> a -> Bool) -> a -> [a] -> [a]
deleteBy eq x [] = []
deleteBy eq x (y:ys) = if x `eq` y then ys else y : deleteBy eq x ys
(\\) :: Eq a => [a] -> [a] -> [a]
(\\) = foldl (flip delete)
deleteFirstsBy :: (x -> a -> Bool) -> [a] -> [x] -> [a]
deleteFirstsBy :: (a -> a -> Bool) -> [a] -> [a] -> [a]
deleteFirstsBy eq = foldl (flip (deleteBy eq))
union :: Eq a => [a] -> [a] -> [a]
......
......@@ -7,7 +7,7 @@
<img src="h98-libs.gif" alt="Haskell 98 Libraries">
<h3 align="center">Standard Libraries for Haskell 98</h3>
<h3 align="center">Revised: FIX THIS DATE</h3>
<h3 align="center">Revised: June 2001</h3>
<hr>
<a href="http://research.microsoft.com/Users/simonpj">
Simon Peyton Jones</a> [editor], Microsoft Research, Cambridge <br>
......
......@@ -190,7 +190,7 @@ discarded.
Implementations should enforce as far as possible, locally to the
\Haskell{} process, multiple-reader single-writer locking on files.
That is, \emph{there may either be many handles on the same file which manage
That is, {\em there may either be many handles on the same file which manage
input, or just one handle on the file which manages output}. If any
open or semi-closed handle is managing a file for output, no new
handle can be allocated for that file. If any open or semi-closed
......@@ -301,7 +301,7 @@ except that it works only on @stdin@.
Three kinds of buffering are supported: line-buffering,
block-buffering or no-buffering. These modes have the following effects.
For output, items are written out, or \emph{flushed}, from the internal buffer
For output, items are written out, or {\em flushed}, from the internal buffer
according to the buffer mode:
\begin{itemize}
\item
......@@ -335,7 +335,7 @@ next block of data is read into the buffer.
\item
{\bf no-buffering:}
the next input item is read and returned. The @hLookAhead@\indextt{hLookAhead}
operation (Section~\ref{hLookAhead})implies that
operation (Section~\ref{hLookAhead}) implies that
even a no-buffered handle may require a one-character buffer.
\end{itemize}
......@@ -491,7 +491,7 @@ the @hWaitForInput@, @hReady@ and @hGetChar@ computations may fail with:
@isEOFError@ if the end of file has been reached.
\subsubsection{Reading Ahead}
\label{hLookahead}
\label{hLookAhead}
\index{lookahead}
Computation @hLookAhead@~"hdl"\indextt{hLookAhead} returns the next character from handle
......
%
% $Header: /home/cvs/root/haskell-report/libraries/library.verb,v 1.3 2001/05/30 10:59:06 simonpj Exp $
% $Header: /home/cvs/root/haskell-report/libraries/library.verb,v 1.4 2001/06/18 09:52:43 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 FILL IN DATE!}
{\large\bf Revised: June 2001}
\end{center}
\vspace{.15in}
......
%
% $Header: /home/cvs/root/haskell-report/report/basic.verb,v 1.4 2001/05/30 13:47:12 simonpj Exp $
% $Header: /home/cvs/root/haskell-report/report/basic.verb,v 1.5 2001/06/18 09:52:43 simonpj Exp $
%
%**<title>The Haskell 98 Report: Basic Types and Classes</title>
%*section 6
......@@ -121,7 +121,7 @@ All tuples are instances of @Eq@, @Ord@, @Bounded@, @Read@,
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 7, and their instances
implementation must support tuples up to size 15, together with the instances
for @Eq@, @Ord@, @Bounded@, @Read@, @Show@, and @Ix@. The Prelude and
libraries define tuple functions such as @zip@ for tuples up to a size
of 7.
......
%
% $Header: /home/cvs/root/haskell-report/report/decls.verb,v 1.2 2001/05/29 15:40:00 simonpj Exp $
% $Header: /home/cvs/root/haskell-report/report/decls.verb,v 1.3 2001/06/18 09:52:43 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 | var) rhs
| (funlhs | car) rhs
idecls -> @{@ idecl_1 @;@ ... @;@ idecl_n @}@ & \qquad (n>=0)
idecl -> (funlhs | qfunlhs | var | qvar) rhs
......@@ -957,7 +957,7 @@ since these have already been given in the @class@
declaration. As in the case of default class methods
\index{default class method}%
(Section~\ref{class-decls}), the method declarations must take the form of
a variable or function defintion.
a variable or function definition.
However, unlike other declarations, the name of the bound
variable may be qualified. So this is legal:
\bprog
......@@ -1014,7 +1014,7 @@ Any constraints on the type variables in the instance type
% "T" must be an instance of each of "C"'s superclasses. More precisely,
% under the assumption that the constraints expressed by the
% instance context "cx'" are satisfied, the contraints expressed by the
% instance context "cx'" are satisfied, the constraints expressed by the
% superclass context "cx[(T u1 ... uk)/u]" must also be satisfied.
%
% Furthermore, under the same assumption, any constraints arising from the
......
%
% $Header: /home/cvs/root/haskell-report/report/derived.verb,v 1.4 2001/05/30 13:47:12 simonpj Exp $
% $Header: /home/cvs/root/haskell-report/report/derived.verb,v 1.5 2001/06/18 09:52:43 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 r))) == x
fst (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.2 2001/05/29 15:40:00 simonpj Exp $
% $Header: /home/cvs/root/haskell-report/report/exps.verb,v 1.3 2001/06/18 09:52:43 simonpj Exp $
%
%*section 3
%**<title>The Haskell 98 Report: Expressions</title>
......@@ -116,10 +116,10 @@ separation (@;@) & n-ary \\
The grammar is ambiguous regarding the extent of lambda abstractions,
let expressions, and conditionals. The ambiguity is resolved by the
metarule that each of these constructs extends as far to the right as
meta-rule that each of these constructs extends as far to the right as
possible. As a consequence, each of these constructs has two precedences,
one to its left, which is the precedence used in the grammar; and
one to its right, which is obtained via the metarule. See the sample
one to its right, which is obtained via the meta-rule. See the sample
parses below.
Expressions involving infix operators are disambiguated by the
......@@ -420,7 +420,7 @@ function defined in the Prelude such that
The expression "@(+ (-@ exp@))@" can serve the same purpose.
% Changed to allow postfix operators. That is, in (op x), we no
% longer add a \x -> which would require op to be binary insead
% longer add a \x -> which would require op to be binary instead
% of unary.
\outline{
......@@ -867,7 +867,7 @@ stmts -> stmt_1 ... stmt_n exp [@;@] & \qquad (n>=0)
stmt -> exp @;@
| pat @<-@ exp @;@
| @let@ decls @;@
| @;@ & (empty statment)
| @;@ & (empty statement)
@@@
\indexsyn{exp}%
\indexsyn{stmt}%
......
%
% $Header: /home/cvs/root/haskell-report/report/haskell.verb,v 1.3 2001/05/30 10:59:06 simonpj Exp $
% $Header: /home/cvs/root/haskell-report/report/haskell.verb,v 1.4 2001/06/18 09:52:43 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: FILL IN DATE!!}
{\large\bf Revised: June 2001}
\end{center}
\vspace{.15in}
\begin{center} \large
......
......@@ -5,7 +5,7 @@
<img src="h98.gif" alt="Haskell 98">
<h3>Haskell 98: A Non-strict, Purely Functional Language</h3>
<h3 align="center">Revised: FIX THIS DATE</h3>
<h3 align="center">Revised: June 2001</h3>
<hr>
<a href="http://research.microsoft.com/Users/simonpj">
Simon Peyton Jones</a> [editor], Microsoft Research, Cambridge <br>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment