Commit 1b1c97c9 authored by simonpj@microsoft.com's avatar simonpj@microsoft.com
Browse files

Remove result type signatures from documentation

parent 5237f0f5
......@@ -3252,8 +3252,6 @@ A <emphasis>lexically scoped type variable</emphasis> can be bound by:
<listitem><para>A pattern type signature (<xref linkend="pattern-type-sigs"/>)</para></listitem>
<listitem><para>Class and instance declarations (<xref linkend="cls-inst-scoped-tyvars"/>)</para></listitem>
</itemizedlist>
In addition, GHC supports result type signatures (<xref
linkend="result-type-sigs"/>), although they never bind type variables.
</para>
<para>
In Haskell, a programmer-written type signature is implicitly quantifed over
......@@ -3352,6 +3350,9 @@ illegal if <literal>a</literal> was not already in scope.
</sect3>
<!-- ==================== Commented out part about result type signatures
<sect3 id="result-type-sigs">
<title>Result type signatures</title>
......@@ -3359,7 +3360,7 @@ illegal if <literal>a</literal> was not already in scope.
The result type of a function, lambda, or case expression alternative can be given a signature, thus:
<programlisting>
-- f assumes that 'a' is already in scope
{- f assumes that 'a' is already in scope -}
f x y :: [a] = [x,y,x]
g = \ x :: [Int] -> [3,4]
......@@ -3378,7 +3379,7 @@ alternative in <literal>h</literal> is <literal>a</literal>.
There are a couple of syntactic wrinkles. First, notice that all three
examples would parse quite differently with parentheses:
<programlisting>
-- f assumes that 'a' is already in scope
{- f assumes that 'a' is already in scope -}
f x (y :: [a]) = [x,y,x]
g = \ (x :: [Int]) -> [3,4]
......@@ -3401,6 +3402,8 @@ consider how one would parse this:
</para>
</sect3>
-->
<sect3 id="cls-inst-scoped-tyvars">
<title>Class and instance declarations</title>
<para>
......
Supports Markdown
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