Changes between Version 16 and Version 17 of ExplicitForall


Ignore:
Timestamp:
Nov 20, 2010 12:20:49 AM (5 years ago)
Author:
igloo
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ExplicitForall

    v16 v17  
    1616== Description == 
    1717 
    18 !ExplicitForAll enables the use of the keyword 'forall' to make a type 
    19 explicitly polymorphic. Syntactically, it would mean the following 
    20 change to Haskell 98: 
    21  
    22  * forall becomes a reserved word. 
    23  * . (dot) becomes a special (not reserved) operator. 
    24  * The following syntactic rule changes: 
    25  
    26 ''type''      → forall ''tyvars'' . ''type'' 
    27           `|` ''context'' => ''type'' 
    28  
    29           `|` ''ftype'' 
    30  
    31 ''ftype''     → ''btype'' -> ''type'' 
    32           `|` ''btype'' 
    33  
    34 ''gendecl''   → ''vars'' :: ''type'' 
    35  
    36 It does not allow the use of explicitly polymorphic types in any way 
    37 not already allowed by Haskell 98 for implicitly polymorphic types. 
     18!ExplicitForAll enables the use of the keyword 'forall' to explicitly state that a type is polymorphic in its free type variables. 
     19It does not allow any types to be written that cannot already be written; it just allows the programmer to explicitly state the (currently implicit) quantification. 
    3820 
    3921== Pros == 
     
    4628== Cons == 
    4729 
     30 * Programs using `forall` as a type or expression variable will break. 
    4831 * A small and incremental extension with little value of its own, only serving as a stepping stone for the various semantic extensions. 
    4932