Executive summary of our extensions:
</Para>
-<Para>
-<VariableList>
-
-<VarListEntry>
-<Term>Unboxed types and primitive operations:</Term>
-<ListItem>
-<Para>
-You can get right down to the raw machine types and operations;
-included in this are “primitive arrays” (direct access to Big Wads
-of Bytes). Please see <XRef LinkEnd="glasgow-unboxed"> and following.
-</Para>
-</ListItem>
-</VarListEntry>
-
-<VarListEntry>
-<Term>Multi-parameter type classes:</Term>
-<ListItem>
-<Para>
-GHC's type system supports extended type classes with multiple
-parameters. Please see <XRef LinkEnd="multi-param-type-classes">.
-</Para>
-</ListItem>
-</VarListEntry>
+ <variablelist>
-<VarListEntry>
-<Term>Local universal quantification:</Term>
-<ListItem>
-<Para>
-GHC's type system supports explicit universal quantification in
-constructor fields and function arguments. This is useful for things
-like defining <Literal>runST</Literal> from the state-thread world. See <XRef LinkEnd="universal-quantification">.
-</Para>
-</ListItem>
-</VarListEntry>
-
-<VarListEntry>
-<Term>Extistentially quantification in data types:</Term>
-<ListItem>
-<Para>
-Some or all of the type variables in a datatype declaration may be
-<Emphasis>existentially quantified</Emphasis>. More details in <XRef LinkEnd="existential-quantification">.
-</Para>
-</ListItem>
-</VarListEntry>
+ <varlistentry>
+ <term>Unboxed types and primitive operations:</Term>
+ <listitem>
+ <para>You can get right down to the raw machine types and
+ operations; included in this are “primitive
+ arrays” (direct access to Big Wads of Bytes). Please
+ see <XRef LinkEnd="glasgow-unboxed"> and following.</para>
+ </listitem>
+ </varlistentry>
-<VarListEntry>
-<Term>Scoped type variables:</Term>
-<ListItem>
-<Para>
-Scoped type variables enable the programmer to supply type signatures
-for some nested declarations, where this would not be legal in Haskell
-98. Details in <XRef LinkEnd="scoped-type-variables">.
-</Para>
-</ListItem>
-</VarListEntry>
+ <varlistentry>
+ <term>Type system extensions:</term>
+ <listitem>
+ <Para> GHC supports a large number of extensions to Haskell's
+ type system. Specifically:</para>
+
+ <variablelist>
+ <varlistentry>
+ <term>Multi-parameter type classes:</term>
+ <listitem>
+ <para><XRef LinkEnd="multi-param-type-classes"></para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>Functional dependencies:</term>
+ <listitem>
+ <para><XRef LinkEnd="functional-dependencies"></para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>Implicit parameters:</term>
+ <listitem>
+ <para><XRef LinkEnd="implicit-parameters"></para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>Local universal quantification:</term>
+ <listitem>
+ <para><XRef LinkEnd="universal-quantification"></para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>Extistentially quantification in data types:</term>
+ <listitem>
+ <para><XRef LinkEnd="existential-quantification"></para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>Scoped type variables:</term>
+ <listitem>
+ <para>Scoped type variables enable the programmer to
+ supply type signatures for some nested declarations,
+ where this would not be legal in Haskell 98. Details in
+ <XRef LinkEnd="scoped-type-variables">.</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </listitem>
+ </varlistentry>
-<VarListEntry>
-<Term>Pattern guards</Term>
-<ListItem>
-<Para>
-Instead of being a boolean expression, a guard is a list of qualifiers, exactly as in a list comprehension. See <XRef LinkEnd="pattern-guards">.
-</Para>
-</ListItem>
-</VarListEntry>
+ <varlistentry>
+ <term>Pattern guards</term>
+ <listitem>
+ <para>Instead of being a boolean expression, a guard is a list
+ of qualifiers, exactly as in a list comprehension. See <XRef
+ LinkEnd="pattern-guards">.</para>
+ </listitem>
+ </varlistentry>
-<VarListEntry>
-<Term>Foreign calling:</Term>
-<ListItem>
-<Para>
-Just what it sounds like. We provide <Emphasis>lots</Emphasis> of rope that you
-can dangle around your neck. Please see <XRef LinkEnd="ffi">.
-</Para>
-</ListItem>
-</VarListEntry>
+ <varlistentry>
+ <term>Foreign calling:</term>
+ <listitem>
+ <para>Just what it sounds like. We provide
+ <Emphasis>lots</Emphasis> of rope that you can dangle around
+ your neck. Please see <XRef LinkEnd="ffi">.</para>
+ </listitem>
+ </varlistentry>
-<VarListEntry>
-<Term>Pragmas</Term>
-<ListItem>
-<Para>
-Pragmas are special instructions to the compiler placed in the source
-file. The pragmas GHC supports are described in <XRef LinkEnd="pragmas">.
-</Para>
-</ListItem>
-</VarListEntry>
+ <varlistentry>
+ <term>Pragmas</term>
+ <listitem>
+ <para>Pragmas are special instructions to the compiler placed
+ in the source file. The pragmas GHC supports are described in
+ <XRef LinkEnd="pragmas">.</para>
+ </listitem>
+ </varlistentry>
-<VarListEntry>
-<Term>Rewrite rules:</Term>
-<ListItem>
-<Para>
-The programmer can specify rewrite rules as part of the source program
-(in a pragma). GHC applies these rewrite rules wherever it can.
-Details in <XRef LinkEnd="rewrite-rules">.
-</Para>
-</ListItem>
-</VarListEntry>
+ <varlistentry>
+ <term>Rewrite rules:</term>
+ <listitem>
+ <para>The programmer can specify rewrite rules as part of the
+ source program (in a pragma). GHC applies these rewrite rules
+ wherever it can. Details in <XRef
+ LinkEnd="rewrite-rules">.</para>
+ </listitem>
+ </varlistentry>
-<VarListEntry>
-<Term>Generic classes:</Term>
-<ListItem>
-<Para>
-Generic class declarations allow you to define a class
-whose methods say how to work over an arbitrary data type.
-Then it's really easy to make any new type into an instance of
-the class. This generalises the rather ad-hoc "deriving" feature
-of Haskell 98.
-Details in <XRef LinkEnd="generic-classes">.
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
-</Para>
+ <varlistentry>
+ <term>Generic classes:</term>
+ <listitem>
+ <para>Generic class declarations allow you to define a class
+ whose methods say how to work over an arbitrary data type.
+ Then it's really easy to make any new type into an instance of
+ the class. This generalises the rather ad-hoc "deriving"
+ feature of Haskell 98. Details in <XRef
+ LinkEnd="generic-classes">.</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
<Para>
Before you get too carried away working at the lowest level (e.g.,
</varlistentry>
<varlistentry>
- <term><option>-fignore-asserts</option>:</term>
- <indexterm><primary><option>-fignore-asserts</option></primary></indexterm>
- <listitem>
- <para>See <XRef LinkEnd="sec-assertions">. Only relevant if
- you also use <option>-fglasgow-exts</option>.</Para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
<term><option>-finline-phase</option></term>
<indexterm><primary><option>-finline-phase</option></primary></indexterm>
<listitem>
</Sect1>
+<Sect1 id="implicit-parameters">
+<Title>Implicit parameters
+</Title>
+
+<Para> Implicit paramters are implemented as described in
+"Implicit parameters: dynamic scoping with static types",
+J Lewis, MB Shields, E Meijer, J Launchbury,
+27th ACM Symposium on Principles of Programming Languages (POPL'00),
+Boston, Jan 2000.
+</Para>
+
+<Para>
+There should be more documentation, but there isn't (yet). Yell if you need it.
+</Para>
+<ItemizedList>
+<ListItem>
+<Para> You can't have an implicit parameter in the context of a class or instance
+declaration. For example, both these declarations are illegal:
+<ProgramListing>
+ class (?x::Int) => C a where ...
+ instance (?x::a) => Foo [a] where ...
+</ProgramListing>
+Reason: exactly which implicit parameter you pick up depends on exactly where
+you invoke a function. But the ``invocation'' of instance declarations is done
+behind the scenes by the compiler, so it's hard to figure out exactly where it is done.
+Easiest thing is to outlaw the offending types.</para>
+</ListItem>
+
+</ItemizedList>
+
+</Sect1>
+
+
+<Sect1 id="functional-dependencies">
+<Title>Functional dependencies
+</Title>
+
+<Para> Functional dependencies are implemented as described by Mark Jones
+in "Type Classes with Functional Dependencies", Mark P. Jones,
+In Proceedings of the 9th European Symposium on Programming,
+ESOP 2000, Berlin, Germany, March 2000, Springer-Verlag LNCS 1782.
+</Para>
+
+<Para>
+There should be more documentation, but there isn't (yet). Yell if you need it.
+</Para>
+</Sect1>
+
+
<Sect1 id="universal-quantification">
<Title>Explicit universal quantification
</Title>
<Para>
-GHC now allows you to write explicitly quantified types. GHC's
-syntax for this now agrees with Hugs's, namely:
+GHC's type system supports explicit universal quantification in
+constructor fields and function arguments. This is useful for things
+like defining <Literal>runST</Literal> from the state-thread world.
+GHC's syntax for this now agrees with Hugs's, namely:
</Para>
<Para>