Commit 5263c9ab authored by Josef Svenningsson's avatar Josef Svenningsson

Fix a whole heap of speling errrs in the docs

parent 160e41ed
......@@ -55,7 +55,7 @@ the <option>-fglasgow-exts</option><indexterm><primary><option>-fglasgow-exts</o
</para>
<para>The Haskell FFI already specifies that arguments and results of
foreign imports and exports will be automatically unwrapped if they are
newtypes (Section 3.2 of the FFI addendum). GHC extends the FFI by automatically unnwrapping any newtypes that
newtypes (Section 3.2 of the FFI addendum). GHC extends the FFI by automatically unwrapping any newtypes that
wrap the IO monad itself.
More precisely, wherever the FFI specification requires an IO type, GHC will
accept any newtype-wrapping of an IO type. For example, these declarations are
......@@ -300,10 +300,10 @@ int main(int argc, char *argv[])
}
</programlisting>
<para>The intialisation routine, <literal>mylib_init</literal>, calls
<para>The initialisation routine, <literal>mylib_init</literal>, calls
<literal>hs_init()</literal> and <literal>hs_add_root()</literal> as
normal to initialise the Haskell runtime, and the corresponding
deinitialisation funtion <literal>mylib_end()</literal> calls
deinitialisation function <literal>mylib_end()</literal> calls
<literal>hs_exit()</literal> to shut down the runtime.</para>
</sect3>
......
......@@ -2032,7 +2032,7 @@
</row>
<row>
<entry><option>-ddump-hpc</option></entry>
<entry>Dump after intrumentation for program coverage</entry>
<entry>Dump after instrumentation for program coverage</entry>
<entry>dynamic</entry>
<entry>-</entry>
</row>
......@@ -2098,7 +2098,7 @@
</row>
<row>
<entry><option>-ddump-splices</option></entry>
<entry>Dump TH splided expressions, and what they evaluate to</entry>
<entry>Dump TH spliced expressions, and what they evaluate to</entry>
<entry>dynamic</entry>
<entry>-</entry>
</row>
......
......@@ -393,9 +393,9 @@ Prelude>
<literal>Show</literal></para>
</listitem>
</itemizedlist>
The automatic printing of binding results can be supressed with
The automatic printing of binding results can be suppressed with
<option>:set -fno-print-bind-result</option> (this does not
supress printing the result of non-binding statements).
suppress printing the result of non-binding statements).
<indexterm><primary><option>-fno-print-bind-result</option></primary></indexterm><indexterm><primary><option>-fprint-bind-result</option></primary></indexterm>.
You might want to do this to prevent the result of binding
statements from being fully evaluated by the act of printing
......@@ -1133,7 +1133,7 @@ _result :: IO ()
<para>The command <literal>:step
<replaceable>expr</replaceable></literal> begins the evaluation of
<replaceable>expr</replaceable> in single-stepping mode. If
<replaceable>expr</replaceable> is ommitted, then it single-steps from
<replaceable>expr</replaceable> is omitted, then it single-steps from
the current breakpoint. <literal>:stepover</literal>
works similarly.</para>
......@@ -1760,7 +1760,7 @@ $ ghci -lm
<para>Generates a &ldquo;tags&rdquo; file for Vi-style editors
(<literal>:ctags</literal>) or
Emacs-style editors (<literal>:etags</literal>). If
no filename is specified, the defaulit <filename>tags</filename> or
no filename is specified, the default <filename>tags</filename> or
<filename>TAGS</filename> is
used, respectively. Tags for all the functions, constructors and
types in the currently loaded modules are created. All modules must
......
......@@ -2021,9 +2021,9 @@ In the example, the equality dictionary is used to satisfy the equality constrai
generated by the call to <literal>elem</literal>, so that the type of
<literal>insert</literal> itself has no <literal>Eq</literal> constraint.
</para>
<para>This behaviour contrasts with Haskell 98's peculiar treament of
<para>This behaviour contrasts with Haskell 98's peculiar treatment of
contexts on a data type declaration (Section 4.2.1 of the Haskell 98 Report).
In Haskell 98 the defintion
In Haskell 98 the definition
<programlisting>
data Eq a => Set' a = MkSet' [a]
</programlisting>
......@@ -2132,7 +2132,7 @@ field <literal>f</literal> must be the same (modulo alpha conversion).
<para>
At the moment, record updates are not yet possible with GADT-style declarations,
so support is limited to record construction, selection and pattern matching.
For exmaple
For example
<programlisting>
aPerson = Adult { name = "Fred", children = [] }
......@@ -2239,7 +2239,7 @@ constructor).
<listitem><para>
You cannot use a <literal>deriving</literal> clause for a GADT; only for
an ordianary data type.
an ordinary data type.
</para></listitem>
<listitem><para>
......@@ -2307,7 +2307,7 @@ The third is not Haskell 98, and risks losing termination of instances.
<para>
GHC takes a conservative position: it accepts the first two, but not the third. The rule is this:
each constraint in the inferred instance context must consist only of type variables,
with no repititions.
with no repetitions.
</para>
<para>
This rule is applied regardless of flags. If you want a more exotic context, you can write
......@@ -2343,7 +2343,7 @@ For example:
deriving instance MonadState Int Foo
</programlisting>
GHC always treats the <emphasis>last</emphasis> parameter of the instance
(<literal>Foo</literal> in this exmample) as the type whose instance is being derived.
(<literal>Foo</literal> in this example) as the type whose instance is being derived.
</para>
</sect2>
......@@ -3259,7 +3259,7 @@ by which time more is known about the type <literal>b</literal>.
The willingness to be overlapped or incoherent is a property of
the <emphasis>instance declaration</emphasis> itself, controlled by the
presence or otherwise of the <option>-XOverlappingInstances</option>
and <option>-XIncoherentInstances</option> flags when that mdodule is
and <option>-XIncoherentInstances</option> flags when that module is
being defined. Neither flag is required in a module that imports and uses the
instance declaration. Specifically, during the lookup process:
<itemizedlist>
......@@ -3372,7 +3372,7 @@ instance IsString [Char] where
fromString cs = cs
</programlisting>
The class <literal>IsString</literal> is not in scope by default. If you want to mention
it explicitly (for exmaple, to give an instance declaration for it), you can import it
it explicitly (for example, to give an instance declaration for it), you can import it
from module <literal>GHC.Exts</literal>.
</para>
<para>
......@@ -3553,7 +3553,7 @@ J Lewis, MB Shields, E Meijer, J Launchbury,
Boston, Jan 2000.
</para>
<para>(Most of the following, stil rather incomplete, documentation is
<para>(Most of the following, still rather incomplete, documentation is
due to Jeff Lewis.)</para>
<para>Implicit parameter support is enabled with the option
......@@ -3733,7 +3733,7 @@ In the former case, <literal>len_acc1</literal> is monomorphic in its own
right-hand side, so the implicit parameter <literal>?acc</literal> is not
passed to the recursive call. In the latter case, because <literal>len_acc2</literal>
has a type signature, the recursive call is made to the
<emphasis>polymoprhic</emphasis> version, which takes <literal>?acc</literal>
<emphasis>polymorphic</emphasis> version, which takes <literal>?acc</literal>
as an implicit parameter. So we get the following results in GHCi:
<programlisting>
Prog> len1 "hello"
......@@ -3858,7 +3858,7 @@ Other points:
<itemizedlist>
<listitem> <para> '<literal>?x</literal>' and '<literal>%x</literal>'
are entirely distinct implicit parameters: you
can use them together and they won't intefere with each other. </para>
can use them together and they won't interfere with each other. </para>
</listitem>
<listitem> <para> You can bind linear implicit parameters in 'with' clauses. </para> </listitem>
......@@ -4371,7 +4371,7 @@ a <emphasis>type</emphasis>. (This is a change from GHC's earlier
design.)</para></listitem>
<listitem><para>Furthermore, distinct lexical type variables stand for distinct
type variables. This means that every programmer-written type signature
(includin one that contains free scoped type variables) denotes a
(including one that contains free scoped type variables) denotes a
<emphasis>rigid</emphasis> type; that is, the type is fully known to the type
checker, and no inference is involved.</para></listitem>
<listitem><para>Lexical type variables may be alpha-renamed freely, without
......@@ -4388,7 +4388,7 @@ A <emphasis>lexically scoped type variable</emphasis> can be bound by:
</itemizedlist>
</para>
<para>
In Haskell, a programmer-written type signature is implicitly quantifed over
In Haskell, a programmer-written type signature is implicitly quantified over
its free type variables (<ulink
url="http://haskell.org/onlinereport/decls.html#sect4.1.2">Section
4.1.2</ulink>
......@@ -4463,7 +4463,7 @@ For example:
g (x::a) = x
h ((x,y) :: (Int,Bool)) = (y,x)
</programlisting>
In the case where all the type variables in the pattern type sigature are
In the case where all the type variables in the pattern type signature are
already in scope (i.e. bound by the enclosing context), matters are simple: the
signature simply constrains the type of the pattern in the obvious way.
</para>
......@@ -4489,7 +4489,7 @@ existentially-bound type variable.
<para>
If this seems a little odd, we think so too. But we must have
<emphasis>some</emphasis> way to bring such type variables into scope, else we
could not name existentially-bound type variables in subequent type signatures.
could not name existentially-bound type variables in subsequent type signatures.
</para>
<para>
This is (now) the <emphasis>only</emphasis> situation in which a pattern type
......@@ -4614,12 +4614,12 @@ This is rejected by Haskell 98, but under Jones's scheme the definition for
<literal>g</literal> is typechecked first, separately from that for
<literal>f</literal>,
because the reference to <literal>f</literal> in <literal>g</literal>'s right
hand side is ingored by the dependency analysis. Then <literal>g</literal>'s
hand side is ignored by the dependency analysis. Then <literal>g</literal>'s
type is generalised, to get
<programlisting>
g :: Ord a =&gt; a -> Bool
</programlisting>
Now, the defintion for <literal>f</literal> is typechecked, with this type for
Now, the definition for <literal>f</literal> is typechecked, with this type for
<literal>g</literal> in the type environment.
</para>
......@@ -4910,7 +4910,7 @@ The basic idea is to compile the program twice:</para>
<para>Then compile it again with <option>-prof</option>, and
additionally use <option>-osuf
p_o</option><indexterm><primary><option>-osuf</option></primary></indexterm>
to name the object files differentliy (you can choose any suffix
to name the object files differently (you can choose any suffix
that isn't the normal object suffix here). GHC will automatically
load the object files built in the first step when executing splice
expressions. If you omit the <option>-osuf</option> flag when
......@@ -5468,7 +5468,7 @@ g6 x = case f x of { y -&gt; body }
g7 x = case f x of { !y -&gt; body }
</programlisting>
The functions <literal>g5</literal> and <literal>g6</literal> mean exactly the same thing.
But <literal>g7</literal> evalutes <literal>(f x)</literal>, binds <literal>y</literal> to the
But <literal>g7</literal> evaluates <literal>(f x)</literal>, binds <literal>y</literal> to the
result, and then evaluates <literal>body</literal>.
</para><para>
Bang patterns work in <literal>let</literal> and <literal>where</literal>
......@@ -5781,7 +5781,7 @@ Assertion failures can be caught, see the documentation for the
<para>When you compile any module that imports and uses any
of the specified entities, GHC will print the specified
message.</para>
<para> You can only depecate entities declared at top level in the module
<para> You can only deprecate entities declared at top level in the module
being compiled, and you can only use unqualified names in the list of
entities being deprecated. A capitalised name, such as <literal>T</literal>
refers to <emphasis>either</emphasis> the type constructor <literal>T</literal>
......@@ -6013,7 +6013,7 @@ happen.
<programlisting>
{-# SPECIALIZE f :: &lt;type&gt; #-}
</programlisting>
is valid if and only if the defintion
is valid if and only if the definition
<programlisting>
f_spec :: &lt;type&gt;
f_spec = f
......@@ -6038,7 +6038,7 @@ well. If you use this kind of specialisation, let us know how well it works.
<para>A <literal>SPECIALIZE</literal> pragma can optionally be followed with a
<literal>INLINE</literal> or <literal>NOINLINE</literal> pragma, optionally
followed by a phase, as described in <xref linkend="inline-noinline-pragma"/>.
The <literal>INLINE</literal> pragma affects the specialised verison of the
The <literal>INLINE</literal> pragma affects the specialised version of the
function (only), and applies even if the function is recursive. The motivating
example is this:
<programlisting>
......@@ -6734,7 +6734,7 @@ If you add <option>-dppr-debug</option> you get a more detailed listing.
<listitem>
<para>
The definition of (say) <function>build</function> in <filename>GHC/Base.lhs</filename> looks llike this:
The definition of (say) <function>build</function> in <filename>GHC/Base.lhs</filename> looks like this:
<programlisting>
build :: forall a. (forall b. (a -> b -> b) -> b -> b) -> [a]
......@@ -6831,7 +6831,7 @@ r) ->
<sect1 id="special-ids">
<title>Special built-in functions</title>
<para>GHC has a few built-in funcions with special behaviour. These
<para>GHC has a few built-in functions with special behaviour. These
are now described in the module <ulink
url="../libraries/base/GHC-Prim.html"><literal>GHC.Prim</literal></ulink>
in the library documentation.</para>
......@@ -7001,7 +7001,7 @@ So this too is illegal:
op2 :: a -> Bool
op2 {| p :*: q |} (x :*: y) = False
</programlisting>
(The reason for this restriction is that we gather all the equations for a particular type consructor
(The reason for this restriction is that we gather all the equations for a particular type constructor
into a single generic instance declaration.)
</para>
</listitem>
......@@ -7032,7 +7032,7 @@ Here, op1, op2, op3 are OK, but op4 is rejected, because it has a type variable
inside a list.
</para>
<para>
This restriction is an implementation restriction: we just havn't got around to
This restriction is an implementation restriction: we just haven't got around to
implementing the necessary bidirectional maps over arbitrary type constructors.
It would be relatively easy to add specific type constructors, such as Maybe and list,
to the ones that are allowed.</para>
......
......@@ -63,7 +63,7 @@ Binary distributions come in &ldquo;bundles,&rdquo; called
<para>
<screen>
% cd /your/scratch/space
% bunnzip2 &#60; ghc-<replaceable>version</replaceable>-<replaceable>platform</replaceable>.tar.bz2 | tar xvf -</screen>
% bunzip2 &#60; ghc-<replaceable>version</replaceable>-<replaceable>platform</replaceable>.tar.bz2 | tar xvf -</screen>
</para>
<para>
......
......@@ -631,7 +631,7 @@ $ export GHC_PACKAGE_PATH=$HOME/.my-ghc-packages.conf:</screen>
databases. Additionally, <replaceable>file</replaceable> will
also be the database modified by a <literal>register</literal>,
<literal>unregister</literal>, <literal>expose</literal> or
<literal>hide</literal> command, unless it is overriden by a later
<literal>hide</literal> command, unless it is overridden by a later
<option>--package-conf</option>, <option>--user</option> or
<option>--global</option> option.</para>
</listitem>
......
......@@ -5,7 +5,7 @@
</indexterm>
<para>GHC implements some major extensions to Haskell to support
concurrent and parallel programming. Let us first etablish terminology:
concurrent and parallel programming. Let us first establish terminology:
<itemizedlist>
<listitem><para><emphasis>Parallelism</emphasis> means running
a Haskell program on multiple processors, with the goal of improving
......
......@@ -133,7 +133,7 @@
<title>Forcing options to a particular phase</title>
<indexterm><primary>forcing GHC-phase options</primary></indexterm>
<para>Options can be forced through to a particlar compilation
<para>Options can be forced through to a particular compilation
phase, using the following flags:</para>
<variablelist>
......@@ -412,7 +412,7 @@ $ cat foo.hspp</screen>
<listitem>
<para>This symbol is defined when pre-processing Haskell
(input) and pre-processing C (GHC output). Since GHC from
verion 4.00 now supports concurrent haskell by default,
version 4.00 now supports concurrent haskell by default,
this symbol is always defined.</para>
</listitem>
</varlistentry>
......
......@@ -1256,7 +1256,7 @@ to re-read its input file:
<indexterm><primary>hpc</primary></indexterm>
<para>
Code coverage tools allow a programer to determine what parts of
Code coverage tools allow a programmer to determine what parts of
their code have been actually executed, and which parts have
never actually been invoked. GHC has an option for generating
instrumented code that records code coverage as part of the
......
......@@ -110,7 +110,7 @@
increase the resolution of the time profiler.</para>
<para>Using a value of zero disables the RTS clock
completetly, and has the effect of disabling timers that
completely, and has the effect of disabling timers that
depend on it: the context switch timer and the heap profiling
timer. Context switches will still happen, but
deterministically and at a rate much faster than normal.
......
......@@ -703,7 +703,7 @@ module B where
Here <filename>A</filename> imports <filename>B</filename>, but <filename>B</filename> imports
<filename>A</filename> with a <literal>{-# SOURCE #-}</literal> pragma, which breaks the
circular dependency. For every module <filename>A.hs</filename> that is <literal>{-# SOURCE #-}</literal>-imported
in this way there must exist a souce file <literal>A.hs-boot</literal>. This file contains an abbreviated
in this way there must exist a source file <literal>A.hs-boot</literal>. This file contains an abbreviated
version of <filename>A.hs</filename>, thus:
<programlisting>
module A where
......@@ -1040,7 +1040,7 @@ ghc -M -optdep-f -optdep.depend ...
<varlistentry>
<term><option>-v2</option></term>
<listitem>
<para>Print a full list of the module depenencies to stdout.
<para>Print a full list of the module dependencies to stdout.
(This is the standard verbosity flag, so the list will
also be displayed with <option>-v3</option> and
<option>-v4</option>;
......
......@@ -638,7 +638,7 @@ ghc -c Foo.hs</screen>
<title>Overriding the default behaviour for a file</title>
<para>As described above, the way in which a file is processed by GHC
depends on its suffix. This behaviour can be overriden using the
depends on its suffix. This behaviour can be overridden using the
<option>-x</option> option:</para>
<variablelist>
......@@ -1130,7 +1130,7 @@ f foo = foo { x = 6 }
<para>This option causes a warning to be emitted whenever the
module contains an "orphan" instance declaration or rewrite rule.
An instance declartion is an orphan if it appears in a module in
An instance declaration is an orphan if it appears in a module in
which neither the class nor the type being instanced are declared
in the same module. A rule is an orphan if it is a rule for a
function declared in another module. A module containing any
......@@ -1722,7 +1722,7 @@ f "2" = 2
is also possible to obtain performance improvements with parallelism
on programs that do not use concurrency. This section describes how to
use GHC to compile and run parallel programs, in <xref
linkend="lang-parallel" /> we desribe the language features that affect
linkend="lang-parallel" /> we describe the language features that affect
parallelism.</para>
<sect2 id="parallel-options">
......
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