Changes between Version 5 and Version 6 of ExplicitForall


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

--

Legend:

Unmodified
Added
Removed
Modified
  • ExplicitForall

    v5 v6  
    3737not already allowed by Haskell 98 for implicitly polymorphic types.
    3838
     39== Report Delta ==
     40
     41[incomplete]
     42
     43Changes relative to H2010 report.
     44
     45In [http://www.haskell.org/onlinereport/haskell2010/haskellch4.html#dx10-65031 Section 4.1.2]:
     46
     47Replace:
     48{{{
     49#!html
     50<div style="background: #fdd; border-color: #c00; border-style: solid; border-width: 1px">
     51<pre>
     52With one exception (that of the distinguished type variable in a class declaration (Section 4.3.1)), the type
     53variables in a Haskell type expression are all assumed to be universally quantified; there is no explicit syntax
     54for universal quantification [4]. For example, the type expression <span style="background: #fbb">forall a . a -> a</span> denotes the type <span style="background: #fbb">∀ a . a → a</span>.
     55For clarity, however, we often write quantification explicitly when discussing the types of Haskell programs.
     56When we write an explicitly quantified type, the scope of the  extends as far to the right as possible; for
     57example, <span style="background: #fbb">∀ a . a → a</span> means <span style="background: #fbb">∀ a . (a → a)</span>.
     58</pre>
     59</div>
     60}}}
     61with:
     62{{{
     63#!html
     64<div style="background: #dfd; border-color: #0c0; border-style: solid; border-width: 1px">
     65<pre>
     66The type variables in a type signature may be explicitly quantified with the <span style="background: #bfb">forall</span> keyword. All type
     67variables used in the type must be quantified, with one exception (that of the distinguished type
     68variable in a class declaration (Section 4.3.1), which must not be quantified). No additional type
     69variables may be quantified. The scope of the quantifier extends as far to the right as possible.
     70For example, the type expression <span style="background: #bfb">a -> a</span> denotes the type <span style="background: #bfb">∀ a . a → a</span>. Quantifying the type variables is
     71optional. For example, the type expression <span style="background: #bfb">a -> a</span> also denotes the type <span style="background: #bfb">∀ a . a → a</span>.
     72</pre>
     73</div>
     74}}}
     75
     76-----
     77
     78
    3979== References ==
    4080