Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Haskell
prime
Commits
e524f97a
Commit
e524f97a
authored
May 30, 2001
by
Simon Peyton Jones
Browse files
May 2001 release
parent
0a55db15
Changes
8
Hide whitespace changes
Inline
Side-by-side
haskell98-bugs.html
View file @
e524f97a
...
...
@@ -48,15 +48,15 @@ should be
size :: Stack a -> Int
</pre>
<p><li>
[Apr 200
0
1]
<strong>
Page 14, Section 3.1, Errors.
</strong>
In the first sentence of
<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 200
0
1]
<strong>
Page 20, Section 3.10, Arithmetic sequences.
</strong>
<p><li>
[Apr 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>
".
<p><li>
[Apr 200
0
1]
<strong>
Page 21, Section 3.11, List Comprehensions; and Page 128.
</strong>
<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".
<li>
Remove the production for (empty qualifier)
</ul>
...
...
@@ -65,7 +65,7 @@ and no qualifier is empty. The translation lower down page 23 is then
not utterly rigorous, because Q can be empty, and when it is there is no preceding
comma, but I reckon it would make matters worse to "fix" it.
<p><li>
[Apr 200
0
1]
<strong>
Page 23, Section 3.14, Do Expressions;
<p><li>
[Apr 2001]
<strong>
Page 23, Section 3.14, Do Expressions;
and Page 128, Appendix B.4, Context Free Syntax.
</strong>
<ul>
<li>
...
...
@@ -78,11 +78,11 @@ Change the production for <em>stmts</em> to read:
That is, every list of statements must end in an expression, optionally
followed by a semicolon.
<p><li>
[Apr 200
0
1]
<strong>
Page 31,33, Figures 3 and 4, Semantics of Case Expressions.
</strong>
<p><li>
[Apr 2001]
<strong>
Page 31,33, Figures 3 and 4, Semantics of Case Expressions.
</strong>
Replace "completely new variable" by "new variable" in these two figures. (Some clauses
said "new" and some "completely new" which is misleadingly inconsistent.)
<p><li>
[Apr 200
0
1]
<strong>
Page 33, Figure 4, Semantics of Case Expressions Part 2.
</strong>
<p><li>
[Apr 2001]
<strong>
Page 33, Figure 4, Semantics of Case Expressions Part 2.
</strong>
In clause (r) replace "e0" by "v" throughout.
<p><li>
<strong>
Page 40, Section 4.2.1, Algebraic Datatype Declarations.
</strong>
...
...
@@ -117,7 +117,7 @@ The new phrase is "if v appears only in constraints of the
form (C v) where C is a class". Without this condition the rest of the
sentence does not make sense.
<p><li>
[Apr 200
0
1]
<strong>
Page 53, Section 4.3.3.
</strong>
Replace "For example, these two function
<p><li>
[Apr 2001]
<strong>
Page 53, Section 4.3.3.
</strong>
Replace "For example, these two function
definitions are equivalent:", and the two lines of code that follow by:
<br>
"For example, these three function definitions are all equivalent:
...
...
@@ -129,7 +129,7 @@ definitions are equivalent:", and the two lines of code that follow by:
(This change makes explicit that an infix operator with more than two arguments
can have all of them on the LHS.)
<p><li>
[Apr 200
0
1]
<strong>
Page 54, Section 4.4.3, subsection Function Bindings.
</strong>
<p><li>
[Apr 2001]
<strong>
Page 54, Section 4.4.3, subsection Function Bindings.
</strong>
In the first translation scheme ("The general binding form for functions..."),
the
<em>
xn
</em>
should be
<em>
xk
</em>
(suitably subscripted in both cases!),
and all three
<em>
m
</em>
subscripts should be
<em>
n
</em>
.
...
...
@@ -145,6 +145,17 @@ is wrong; it should read
f x y = return x == y
</pre>
<p><li>
[May 2001]
<strong>
Page 62, Section 5, Modules.
</strong>
In paragraph 4, add a footnote to the sentence "A multi-module Haskell
program can be converted into a single-module program by ...", namely:
<p>
"There are two minor exceptions to this statement.
First,
<tt>
default
</tt>
declarations scope over a single module (Section 4.3.4).
Second, Rule 2 of the monomorphism restriction (Section 4.5.5)
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...".
...
...
@@ -198,6 +209,25 @@ reference to <tt>null</tt> must also resolve the ambiguous use of <tt>null</tt>
just as
<tt>
A
</tt>
does. Thus there is little danger of accidentally shadowing
Prelude names."
<p><li>
[May 2001]
<strong>
Page 74, Section 6.1.6, Tuples.
</strong>
Replace the first paragraph of this section with:
<p>
"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>
,
and
<tt>
Show
</tt>
(provided, of course, that all their component types are).
Classes defined in the libraries may also supply
instances for tuple types.
<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 7, and their instances
for
<tt>
Eq
</tt>
,
<tt>
Ord
</tt>
,
<tt>
Bounded
</tt>
,
<tt>
Read
</tt>
, and
<tt>
Show
</tt>
. The Prelude and
libraries define tuple functions such as
<tt>
zip
</tt>
for tuples up to a size
of 7."
<p><li>
[Apr 2001]
<strong>
Page 74, Section 6.1.6, Function Types.
</strong>
Delete the sentence "Functions are an instance of the
<tt>
Show
</tt>
class but not
<tt>
Read
</tt>
".
...
...
@@ -324,7 +354,24 @@ Replace the definitions of <tt>take</tt>, <tt>drop</tt>, and <tt>splitAt</tt> wi
The effect is that all three functions are defined on negative arguments. This
is a semantic change.
<p><li>
[May 2000.]
<strong>
Page 132, Appendix D, Specification of Derived Instances
</strong>
.
<p><li>
[May 2001]
<strong>
Page 115, instances
<tt>
Show Int
</tt>
and
<tt>
Read Int
</tt></strong>
.
Replace the instances for
<tt>
Show Int
</tt>
and
<tt>
Read Int
</tt>
with
<pre>
instance Show Int where
showsPrec = showsPrec . toInteger
-- Converting to Integer avoids
-- possible difficulty with minInt
instance Read Int where
readsPrec p r = (fromInteger i, t)
where
(i,t) = readsPrec p r
-- Reading at the Integer type avoids
-- possible difficulty with minInt
</pre>
The previous definitions (which are simply specifications, remember) failed on minInt.
<p><li>
[May 2001]
<strong>
Page 132, Appendix D, Specification of Derived Instances
</strong>
.
In numbered item 3, replace
``(all constructors must by nullary)'' with
``(all constructors must be nullary)''.
...
...
@@ -373,24 +420,14 @@ doing it by hand. In particular, an error will be raised if y is zero.
<p><li>
<strong>
Page 17, Section 5, first text line
</strong>
. Replace "continuous" by "contiguous".
<p><li>
[Apr 2001]
<strong>
Page 19, Section 5.2, comment on
<tt>
rangeSize
</tt></strong>
. Replace whole comment by
<pre>
-- NB: replacing "null (range b)" by "not (l
<
=
h
)"
--
fails
if
the
bounds
are
tuples.
For
example
,
--
(1,2)
<=
(2,1)
--
but
the
range
is
nevertheless
empty
--
range
((1,2),(2,1
)) =
[]
</
pre
>
(This simply fixes a misleading comment.)
<p><li>
[May 2000]
<strong>
Page 17, Section 5, Indexing operations
</strong>
.
<p><li>
[May 2001]
<strong>
Page 17, Section 5, Indexing operations
</strong>
.
Add the following equation to the laws listed just before Section 5.1:
<pre>
map index (range (l,u)) == [0..rangeSize (l,u)]
</pre>
This documents an invariant that was previously only implicit.
<p><li>
[May 200
0
]
<strong>
Page 17, Section 5, Indexing operations
</strong>
.
<p><li>
[May 200
1
]
<strong>
Page 17, Section 5, Indexing operations
</strong>
.
This significant item (a) removes
<tt>
Ord
</tt>
from
<tt>
Ix
</tt>
's superclasses, and
(b) make
<tt>
rangeSize
</tt>
into a method of
<tt>
Ix
</tt>
rather than a free-standing declaration.
Though these changes are
...
...
@@ -421,12 +458,13 @@ class declaration, and the <tt>rangeSize</tt> declaration, with:
--
but
the
range
is
nevertheless
empty
--
range
((1,2),(2,1
)) =
[]
</
pre
>
(Note: the comment has changed too; it was misleading before.)
</ul>
<p><li>
<strong>
Page 22, Section 6.3; and Page 23, Fig 3
</strong>
:
Replace "
<tt>
map
</tt>
" by "
<tt>
fmap
</tt>
" (two occurrences in 6.3, one in Fig 3).
<p><li>
[May 200
0
]
<strong>
Page 23, Figure 3
</strong>
.
<p><li>
[May 200
1
]
<strong>
Page 23, Figure 3
</strong>
.
In the definition of
<tt>
diag
</tt>
, delete the guard ``
<tt>
| l==l'
&&
u==u'
</tt>
''.
(The original intent was presumably to check for a square array, but
simply makes the definition recursive and hence divergent.)
...
...
@@ -473,6 +511,16 @@ The signature for <tt>try</tt> should be
try :: IO a -> IO (Either IOError a)
</pre>
<p><li>
[May 2001]
<strong>
Page 57, Section 11.2.1 Semi-closed handles
</strong>
.
Replace the sentence "Once a semi-closed handle becomes closed..." with
"Once a semi-closed handle becomes closed, the contents of the
associated list becomes fixed. The contents of this final list is
only partially specified: it will contain at least all the items of
the stream that were evalutated prior to the handle becoming closed."
<p>
This change attempts to clarify the (murky) meaning of
<tt>
hGetContents
</tt>
followed by
<tt>
hClose
</tt>
.
<p><li>
[Apr 2001]
<strong>
Page 56-58, Section 11.2, Files and Handles
</strong>
.
Add a section 11.2.3 to clarify the file-locking issue. It says:
<p>
...
...
@@ -494,6 +542,17 @@ consumed. It follows that an attempt to write to a file (using <tt>writeFile</t
that was earlier opened by
<tt>
readFile
</tt>
will usually result in
failure with
<tt>
isAlreadyInUseError
</tt>
."
<p><li>
[May 2001]
<strong>
Page 59, Section 11.4.2
</strong>
.
Before "The buffer is emptied as soon as it has been written out." add:
"An implementation is free to flush the buffer more frequently, but not
less frequently, than
specified above." (Clarification only.)
<p><li>
[May 2001]
<strong>
Page 59, Section 11.4.2
</strong>
.
In the second no-buffering bullet (sixth bullet in the sub-section) add the
sentence: "The
<tt>
hLookAhead
</tt>
operation implies that
even a no-buffered handle may require a one-character buffer. " (Clarification only.)
<p><li><strong>
Page 62, Section 11.7.2
</strong>
.
<ul>
<li>
Add a new section heading "
<strong>
11.7.3 Reading the entire input
</strong>
"
...
...
libraries/index.html
View file @
e524f97a
...
...
@@ -14,7 +14,7 @@ Simon Peyton Jones</a> [editor], Microsoft Research, Cambridge <br>
<a
href=
"http://www.cs.chalmers.se/~rjmh"
>
John Hughes
</a>
[editor], Chalmers University of Technology
<br>
<a
href=
"http://www.cs.chalmers.se/~augustss"
>
Lennart Augustsson
</a>
,
Chalmers University of Technology
<br>
Lennart Augustsson
</a>
,
Sandburst Corporation
<br>
<a
href=
"http://www.inmet.com/~dlb"
>
Dave Barton
</a>
, Intermetrics
<br>
<a
href=
"http://www.comp.vuw.ac.nz/Staff/Brian-Boutel.html"
>
...
...
@@ -32,19 +32,19 @@ Paul Hudak</a>, Yale University <br>
<a
href=
"http://www.cs.chalmers.se/~johnsson"
>
Thomas Johnsson
</a>
, Chalmers University of Technology
<br>
<a
href=
"http://www.cs.nott.ac.uk/Department/Staff/mpj/index.html"
>
Mark Jones
</a>
,
University of Nottingham
<br>
Mark Jones
</a>
,
Oregon Graduate Institute
<br>
<a
href=
"http://www.cse.ogi.edu/~jl"
>
John Launchbury
</a>
, Oregon Graduate Institute
<br>
<a
href=
"http://haskell.org/erik.html"
>
Erik Meijer
</a>
,
Utrecht University
<br>
Erik Meijer
</a>
,
Microsoft Corporation
<br>
<a
href=
"http://www.cs.yale.edu/homes/peterson-john.html"
>
John Peterson
</a>
, Yale University
<br>
<a
href=
"http://www.cs.yale.edu/homes/reid-alastair.html"
>
Alastair Reid
</a>
,
Yale
University
<br>
Alastair Reid
</a>
, University
of Utah
<br>
<a
href=
"http://www.cs.york.ac.uk/~colin/home.html"
>
Colin Runciman
</a>
, York University
<br>
<a
href=
"http://cm.bell-labs.com/cm/cs/who/wadler/"
>
Philip Wadler
</a>
,
University of Glasgow
<br>
Philip Wadler
</a>
,
Avaya Labs
<br>
</div>
<hr>
Contents:
...
...
libraries/io.verb
View file @
e524f97a
...
...
@@ -160,30 +160,31 @@ handles are initially open.
\label{SemiClosed}
\index{semi-closed handles}
The operation "@hGetContents@ hdl"\indextt{hGetContents}
The operation "@hGetContents@ hdl"\indextt{hGetContents}
(Section~\ref{hGetContents})
puts a handle "hdl" into an intermediate
state, {\em semi-closed}. In this state, "hdl" is effectively closed,
but items are read from "hdl" on demand and accumulated in a special
st
ream
returned by @hGetContents@~"hdl".
li
st returned by @hGetContents@~"hdl".
Any operation that fails because a handle is
closed, also fails if a handle is semi-closed. The only exception is @hClose@.
A semi-closed handle
becomes closed:
A semi-closed handle becomes closed:
\begin{itemize}
\item
if @hClose@ is applied to it;
\item
if an I/O error occurs when reading an item from the
file item from the stream;
if an I/O error occurs when reading an item from the handle;
\item
or once the entire contents of the
fi
le has been read.
or once the entire contents of the
hand
le has been read.
\end{itemize}
Once a semi-closed handle becomes closed, the contents of the
associated stream becomes fixed, and is the list of those items which
were successfully read from that handle. Any I/O errors encountered while
a handle is semi-closed are simply discarded.
associated list becomes fixed. The contents of this final list is
only partially specified: it will contain at least all the items of
the stream that were evalutated prior to the handle becoming closed.
Any I/O errors encountered while a handle is semi-closed are simply
discarded.
\subsubsection{File locking}
...
...
@@ -300,22 +301,24 @@ 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 from the internal buffer
For output, items are written out
, or \emph{flushed},
from the internal buffer
according to the buffer mode:
\begin{itemize}
\item
{\bf line-buffering:}
the entire buffer is
written out
whenever a newline is output, the
buffer overflows, a
f
lush is issued, or the handle is closed.
the entire buffer is
flushed
whenever a newline is output, the
buffer overflows, a
@hF
lush
@
is issued, or the handle is closed.
\item
{\bf block-buffering:}
the entire buffer is written out whenever it overflows, a
f
lush is
the entire buffer is written out whenever it overflows, a
@hF
lush
@
is
issued, or the handle is closed.
\item
{\bf no-buffering:}
output is written immediately, and never stored in the buffer.
\end{itemize}
The buffer is emptied as soon as it has been written out.
An implementation is free to flush the buffer more frequently, but not
less frequently, than
specified above. The buffer is emptied as soon as it has been written out.
Similarly, input occurs according to the buffer mode for handle "hdl".
\begin{itemize}
...
...
@@ -331,7 +334,9 @@ when the buffer for "hdl" becomes empty, the
next block of data is read into the buffer.
\item
{\bf no-buffering:}
the next input item is read and returned.
the next input item is read and returned. The @hLookAhead@\indextt{hLookAhead}
operation (Section~\ref{hLookAhead})implies that
even a no-buffered handle may require a one-character buffer.
\end{itemize}
For most implementations, physical files will normally be block-buffered
...
...
@@ -494,7 +499,7 @@ Computation @hLookAhead@~"hdl"\indextt{hLookAhead} returns the next character fr
character is available.
{\em Error reporting}:
the @hLook
a
head@ computation may fail with:
the @hLook
A
head@ computation may fail with:
@isEOFError@ if the end of file has been reached.
\subsubsection{Reading The Entire Input}
...
...
libraries/library.verb
View file @
e524f97a
%
% $Header: /home/cvs/root/haskell-report/libraries/library.verb,v 1.
2
2001/05/
29 15:39:59
simonpj Exp $
% $Header: /home/cvs/root/haskell-report/libraries/library.verb,v 1.
3
2001/05/
30 10:59:06
simonpj Exp $
%
% NOTE:--------------------------------------------------------------
% The formatting of this report and the ``new font selection scheme''
...
...
@@ -419,13 +419,13 @@
\begin{center} \large
\begin{tabular}{l@@{\hspace{5mm}}l}
Simon Peyton Jones$^8$ [editor] & John Hughes$^3$ [editor] \\
Lennart Augustsson$^
3
$ & Dave Barton$^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$^
9
$ \\
Thomas Johnsson$^3$ & Mark Jones$^
14
$ \\
John Launchbury$^{14}$ & Erik Meijer$^{10}$ \\
John Peterson$^1$ & Alastair Reid$^
1
$ \\
John Peterson$^1$ & Alastair Reid$^
{15}
$ \\
Colin Runciman$^{13}$ & Philip Wadler$^{11}$
\end{tabular}
\end{center}
...
...
@@ -441,12 +441,13 @@ Authors' affiliations:
(6)~Los Alamos National Laboratory
(7)~Intermetrics
(8)~Microsoft Research, Cambridge
(9)~
University of Nottingham
(10)~
Utrecht University
(11)~
Bell
Labs
(9)~
Sandburst Corporation
(10)~
Microsoft Corporation
(11)~
Avaya
Labs
(12)~University of Bonn
(13)~York University
(14)~Oregon Graduate Institute
(15)~University of Utah
\end{quotation}
\vspace{.2in}
\begin{center}
...
...
report/basic.verb
View file @
e524f97a
%
% $Header: /home/cvs/root/haskell-report/report/basic.verb,v 1.
2
2001/05/
29 15:40
:0
0
simonpj Exp $
% $Header: /home/cvs/root/haskell-report/report/basic.verb,v 1.
3
2001/05/
30 10:59
:0
6
simonpj Exp $
%
%**<title>The Haskell 98 Report: Basic Types and Classes</title>
%*section 6
...
...
@@ -115,15 +115,19 @@ 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.
There is no upper bound on the size of a tuple. However, some
\Haskell{} implementations may restrict the size of tuples and limit
the instances associated with larger tuples.
The Prelude and libraries define tuple functions such as @zip@ for
tuples up to a
size of 7. All tuples are instances of @Eq@, @Ord@, @Bounded@, @Read@,
and @Show@. Classes defined in the libraries may also supply
All tuples are instances of @Eq@, @Ord@, @Bounded@, @Read@,
and @Show@ (provided, of course, that all their component types are).
Classes defined in the libraries may also supply
instances for tuple types.
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
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.
The constructor for a tuple is written by omitting the expressions
surrounding the commas; thus @(x,y)@ and @(,) x y@ produce the same
value. The same holds for tuple type constructors; thus, @(Int,Bool,Int)@
...
...
report/haskell.verb
View file @
e524f97a
%
% $Header: /home/cvs/root/haskell-report/report/haskell.verb,v 1.
2
2001/05/
29 15:40
:0
0
simonpj Exp $
% $Header: /home/cvs/root/haskell-report/report/haskell.verb,v 1.
3
2001/05/
30 10:59
:0
6
simonpj Exp $
%
% NOTE:--------------------------------------------------------------
...
...
@@ -432,13 +432,13 @@
\begin{center} \large
\begin{tabular}{l@@{\hspace{5mm}}l}
Simon Peyton Jones$^8$ [editor] & John Hughes$^3$ [editor] \\
Lennart Augustsson$^
3
$ & Dave Barton$^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$^
9
$ \\
Thomas Johnsson$^3$ & Mark Jones$^
14
$ \\
John Launchbury$^{14}$ & Erik Meijer$^{10}$ \\
John Peterson$^1$ & Alastair Reid$^
1
$ \\
John Peterson$^1$ & Alastair Reid$^
{15}
$ \\
Colin Runciman$^{13}$ & Philip Wadler$^{11}$
\end{tabular}
\end{center}
...
...
@@ -454,12 +454,13 @@ Authors' affiliations:
(6)~Los Alamos National Laboratory
(7)~Intermetrics
(8)~Microsoft Research, Cambridge
(9)~
University of Nottingham
(10)~
Utrecht University
(11)~
Bell
Labs
(9)~
Sandburst Corporation
(10)~
Microsoft Corporation
(11)~
Avaya
Labs
(12)~University of Bonn
(13)~York University
(14)~Oregon Graduate Institute
(15)~University of Utah
\end{quotation}
\vspace{.2in}
...
...
report/index.html
View file @
e524f97a
...
...
@@ -12,7 +12,7 @@ Simon Peyton Jones</a> [editor], Microsoft Research, Cambridge <br>
<a
href=
"http://www.cs.chalmers.se/~rjmh"
>
John Hughes
</a>
[editor], Chalmers University of Technology
<br>
<a
href=
"http://www.cs.chalmers.se/~augustss"
>
Lennart Augustsson
</a>
,
Chalmers University of Technology
<br>
Lennart Augustsson
</a>
,
Sandburst Corporation
<br>
<a
href=
"http://www.inmet.com/~dlb"
>
Dave Barton
</a>
, Intermetrics
<br>
<a
href=
"http://www.comp.vuw.ac.nz/Staff/Brian-Boutel.html"
>
...
...
@@ -30,19 +30,19 @@ Paul Hudak</a>, Yale University <br>
<a
href=
"http://www.cs.chalmers.se/~johnsson"
>
Thomas Johnsson
</a>
, Chalmers University of Technology
<br>
<a
href=
"http://www.cs.nott.ac.uk/Department/Staff/mpj/index.html"
>
Mark Jones
</a>
,
University of Nottingham
<br>
Mark Jones
</a>
,
Oregon Graduate Institute
<br>
<a
href=
"http://www.cse.ogi.edu/~jl"
>
John Launchbury
</a>
, Oregon Graduate Institute
<br>
<a
href=
"http://haskell.org/erik.html"
>
Erik Meijer
</a>
,
Utrecht University
<br>
Erik Meijer
</a>
,
Microsoft Corporation
<br>
<a
href=
"http://www.cs.yale.edu/homes/peterson-john.html"
>
John Peterson
</a>
, Yale University
<br>
<a
href=
"http://www.cs.yale.edu/homes/reid-alastair.html"
>
Alastair Reid
</a>
,
Yale
University
<br>
Alastair Reid
</a>
, University
of Utah
<br>
<a
href=
"http://www.cs.york.ac.uk/~colin/home.html"
>
Colin Runciman
</a>
, York University
<br>
<a
href=
"http://cm.bell-labs.com/cm/cs/who/wadler/"
>
Philip Wadler
</a>
,
University of Glasgow
<br>
Philip Wadler
</a>
,
Avaya Labs
<br>
</div>
<hr>
Brief Table of Contents.
...
...
report/modules.verb
View file @
e524f97a
%
% $Header: /home/cvs/root/haskell-report/report/modules.verb,v 1.
2
2001/05/
29 15:40
:0
0
simonpj Exp $
% $Header: /home/cvs/root/haskell-report/report/modules.verb,v 1.
3
2001/05/
30 10:59
:0
6
simonpj Exp $
%
%**<title>The Haskell 98 Report: Modules</title>
%*section 5
...
...
@@ -30,11 +30,16 @@ Modules may reference other modules via explicit
imported and specifying its entities to be imported.
Modules may be mutually recursive.
Modules are used
{\em solely}
for name-space control, and are not first class values.
Modules are used for name-space control, and are not first class values.
A multi-module Haskell program can be converted into a single-module
program by giving each entity a unique name, changing all occurrences
to refer to the appropriate unique name, and then concatenating all the module
bodies. For example, here is a three-module program:
bodies\footnote{There are two minor exceptions to this statement.
First, @default@ declarations scope over a single module (Section~\ref{default-decls}).
Second, Rule 2 of the monomorphism restriction (Section~\ref{sect:monomorphism-restriction})
is affected by module boundaries.
}.
For example, here is a three-module program:
\bprog
@
module Main where
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment