diff --git a/haskell98-bugs.html b/haskell98-bugs.html index 53405df37c08eacdbe26eaa80503e042bf028bfc..fb1bec5aada85ebd6445bc61f7956ab4fd114783 100644 --- a/haskell98-bugs.html +++ b/haskell98-bugs.html @@ -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> diff --git a/libraries/code/List.hs b/libraries/code/List.hs index a6123b7c63c48d9c91532feaaf67a4b9e3dcc235..5192c9efa02ad082da29243cd4aa5546fda15acc 100644 --- a/libraries/code/List.hs +++ b/libraries/code/List.hs @@ -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] diff --git a/libraries/index.html b/libraries/index.html index c91563e01edf24cd5f2ec9497c44ba75c73b4101..afc131742b7dfa96dd9156ab44c24c92275f4258 100644 --- a/libraries/index.html +++ b/libraries/index.html @@ -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> diff --git a/libraries/io.verb b/libraries/io.verb index 527c20dfeb396643b8e967f0b0e2a8cc683d921e..36a8de07a89dfec09d49331668669d6ad251205c 100644 --- a/libraries/io.verb +++ b/libraries/io.verb @@ -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 diff --git a/libraries/library.verb b/libraries/library.verb index ab7cf15a5d7348ad27b6b22433e6c6effa142b1f..185f264c4b475fd0aaefa26e21ed499c41dc5a27 100644 --- a/libraries/library.verb +++ b/libraries/library.verb @@ -1,5 +1,5 @@ % -% $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} diff --git a/report/basic.verb b/report/basic.verb index 9f3a6a20aa7916ad460f0895d7f23dd5b8cf5397..eb35b3337db67f8174c932f16e2068f08d9ff976 100644 --- a/report/basic.verb +++ b/report/basic.verb @@ -1,5 +1,5 @@ % -% $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. diff --git a/report/decls.verb b/report/decls.verb index f2749f2b6befd819f979a14e1a9d581a811ec337..60d6d48d011466022bd0308b9d879a41a189a0f2 100644 --- a/report/decls.verb +++ b/report/decls.verb @@ -1,5 +1,5 @@ % -% $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 diff --git a/report/derived.verb b/report/derived.verb index 8a254b58d85981e22f88d08b24db71a4e88f3521..84160d69724e055e16ed891fa6ab1a1f1defdd98 100644 --- a/report/derived.verb +++ b/report/derived.verb @@ -1,5 +1,5 @@ % -% $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 diff --git a/report/exps.verb b/report/exps.verb index 780402a1f01d9796bafdfcd08fafc44ce7546b31..90a5d49f90c3655592f725f9413cf3a224ac65ad 100644 --- a/report/exps.verb +++ b/report/exps.verb @@ -1,5 +1,5 @@ % -% $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}% diff --git a/report/haskell.verb b/report/haskell.verb index 080a18eb7bf993d50b8e054ca608e26282961fea..70eeeee7dfc3c2b67701f09540f1f25bd24fcb08 100644 --- a/report/haskell.verb +++ b/report/haskell.verb @@ -1,5 +1,5 @@ % -% $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 diff --git a/report/index.html b/report/index.html index a55771e64a8f5bc500307b1730b282b28595f83d..a76a455a90d623e301a75dc8c3cfc8abe8b7bff5 100644 --- a/report/index.html +++ b/report/index.html @@ -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>