Changes between Version 10 and Version 11 of ExplicitForall


Ignore:
Timestamp:
Nov 19, 2010 8:39:23 PM (5 years ago)
Author:
igloo
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ExplicitForall

    v10 v11  
    8989-----
    9090
     91In [http://www.haskell.org/onlinereport/haskell2010/haskellch3.html#x8-560003.16 Section 3.16]:
     92
     93Replace:
     94{{{
     95#!html
     96<div style="background: #fdd; border-color: #c00; border-style: solid; border-width: 1px">
     97<pre>
     98<span style="background: #fbb">exp  →  exp :: [context =>] type</span>
     99
     100Expression type-signatures have the form <span style="background: #fbb">e :: t</span>, where <span style="background: #fbb">e</span> is an expression and <span style="background: #fbb">t</span> is a type (Section 4.1.2);
     101they are used to type an expression explicitly and may be used to resolve ambiguous typings due to
     102overloading (see Section 4.3.4). The value of the expression is just that of <span style="background: #fbb">exp</span>. As with normal type
     103signatures (see Section 4.4.1), the declared type may be more specific than the principal type derivable from
     104<span style="background: #fbb">exp</span>, but it is an error to give a type that is more general than, or not comparable to, the principal type.
     105</pre>
     106</div>
     107}}}
     108with:
     109{{{
     110#!html
     111<div style="background: #dfd; border-color: #0c0; border-style: solid; border-width: 1px">
     112<pre>
     113<span style="background: #bfb">exp  →  exp :: [forall tyvar<span style="vertical-align: sub">1</span> … tyvar<span style="vertical-align: sub">k</span> .] [context =>] type  (k ≥ 0)</span>
     114
     115Expression type-signatures have the form <span style="background: #bfb">e :: t</span>, where <span style="background: #bfb">e</span> is an expression and <span style="background: #bfb">t</span> is a type (Section 4.1.2);
     116they are used to type an expression explicitly and may be used to resolve ambiguous typings due to
     117overloading (see Section 4.3.4). The value of the expression is just that of <span style="background: #bfb">exp</span>. As with normal type
     118signatures (see Section 4.4.1), the declared type may be more specific than the principal type derivable from
     119<span style="background: #bfb">exp</span>, but it is an error to give a type that is more general than, or not comparable to, the principal type.
     120
     121The quantification <span style="background: #bfb">[forall tyvar<span style="vertical-align: sub">1</span> … tyvar<span style="vertical-align: sub">k</span> .]</span> is optional, but if given it must quantify exactly the set of
     122type variables used in <span style="background: #bfb">[context =>] type</span> (with one exception: that of the distinguished type variable in a
     123class declaration (Section 4.3.1), which must not be quantified).
     124</pre>
     125</div>
     126}}}
     127
     128-----
     129
    91130In [http://www.haskell.org/onlinereport/haskell2010/haskellch4.html#dx10-65031 Section 4.1.2]:
    92131