Changes between Version 2 and Version 3 of ExistentialQuantification
 Timestamp:
 Nov 29, 2005 1:31:39 PM (9 years ago)
Legend:
 Unmodified
 Added
 Removed
 Modified

ExistentialQuantification
v2 v3 6 6 == Brief Explanation == 7 7 8 Local existential quantification of type variables in a data constructor, 9 introduced with `forall` before the data constructor, e.g. 10 {{{ 11 data Accum a = forall s. MkAccum s (a > s > s) (s > a) 12 }}} 13 The `forall` is justified by the type of the data constructor: 14 {{{ 15 MkAccum :: s > (a > s > s) > (s > a) > Accum a 16 }}} 17 but [http://www.haskell.org/pipermail/haskell/2003June/011995.html some have suggested] using `exists` instead to avoid confusion with PolymorphicComponents. 8 18 == References == 9 19 * [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. … … 37 47 38 48 == Pros == 39 49 * quite handy for representations that delay composition or application, e.g. objects, various parser combinator libraries from Utrecht. 40 50 41 51 == Cons ==