Changes between Version 2 and Version 3 of PolymorphicComponents


Ignore:
Timestamp:
Nov 30, 2005 12:03:19 AM (8 years ago)
Author:
ross@…
Comment:

just the facts, ma'am

Legend:

Unmodified
Added
Removed
Modified
  • PolymorphicComponents

    v2 v3  
    1010newtype Swizzle = MkSwizzle (forall a. Ord a => [a] -> [a]) 
    1111}}} 
     12The constructor then has a [wiki:Rank2Types rank-2 type]: 
     13{{{ 
     14MkSwizzle :: forall a. Ord a => [a] -> [a]) -> Swizzle 
     15}}} 
    1216== References == 
    1317 * [http://www.cse.ogi.edu/~mpj/pubs/haskwork95.html From Hindley-Milner Types to First-Class Structures] by Mark P. Jones, Haskell Workshop, 1995. 
     
    1620== Pros == 
    1721 * type inference seems to be a simple extension of Hindley-Milner. 
    18  * large step in expressiveness: types become impredicative, albeit with an intervening data constructor, enabling Church encodings and similar System F tricks.  The very useful [wiki:Rank2Types] can be viewed as syntactic sugar (and therefore a safe next step). 
    19  * used by `ReadP` type. 
     22 * large increment in expressiveness: types become impredicative, albeit with an intervening data constructor, enabling Church encodings and similar System F tricks. 
     23 * used by the [http://www.haskell.org/ghc/docs/latest/html/libraries/base/Text-ParserCombinators-ReadP.html ReadP] type. 
    2024 
    2125== Cons ==