Changes between Version 19 and Version 20 of ScopedTypeVariables


Ignore:
Timestamp:
Sep 12, 2006 11:43:06 PM (9 years ago)
Author:
ross@…
Comment:

another example

Legend:

Unmodified
Added
Removed
Modified
  • ScopedTypeVariables

    v19 v20  
    108108}}}
    109109   in which referring to the type variable `b` seems to require a binding in a result type signature.
    110    In this case the `forall` and context can be floated out, but not if they were buried in a type synonym.
     110   Nor are binding result type signatures sufficient to name all type variables, e.g. consider naming the type variable `a` in the body of the following function:
     111   {{{
     112iter :: Int -> (forall a. (a -> a) -> (a -> R) -> a -> R)
     113iter n step k init = ...
     114}}}
     115   In these cases the `forall` and context can be floated out, but not if they were buried in a type synonym.
    111116 * If there were a special syntax for binding type variables in existentials, pattern type signatures would be independent of type variable binding (and thus an othogonal design choice).
    112117 * If the language does not include [wiki:GADTs], such type variables could be bound with a new pattern syntax mimicking the `data` declaration, e.g.