Changes between Version 2 and Version 3 of ExistentialQuantification


Ignore:
Timestamp:
Nov 29, 2005 1:31:39 PM (8 years ago)
Author:
ross@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ExistentialQuantification

    v2 v3  
    66== Brief Explanation == 
    77 
     8Local existential quantification of type variables in a data constructor, 
     9introduced with `forall` before the data constructor, e.g. 
     10{{{ 
     11data Accum a = forall s. MkAccum s (a -> s -> s) (s -> a) 
     12}}} 
     13The `forall` is justified by the type of the data constructor: 
     14{{{ 
     15MkAccum :: s -> (a -> s -> s) -> (s -> a) -> Accum a 
     16}}} 
     17but [http://www.haskell.org/pipermail/haskell/2003-June/011995.html some have suggested] using `exists` instead to avoid confusion with PolymorphicComponents. 
    818== References == 
    919 * [http://www.cs.luc.edu/users/laufer/papers/toplas94.pdf Polymorphic Type Inference and Abstract Data Types] by K. Läufer and M. Odersky, in TOPLAS, Sep 1994. 
     
    3747 
    3848== Pros == 
    39  
     49 * quite handy for representations that delay composition or application, e.g. objects, various parser combinator libraries from Utrecht. 
    4050 
    4151== Cons ==