Changes between Version 2 and Version 3 of Ticket #14331, comment 31


Ignore:
Timestamp:
Oct 19, 2017 7:48:39 PM (2 years ago)
Author:
goldfire
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #14331, comment 31

    v2 v3  
    1515   c. It is required that `ki2` have the form `... -> Type` or `kappa2` for some variable `kappa2`. If `ki2` is `kappa2`, then choose `kappa2 := Type`. Now, we have something of the form `... -> Type`. Let the number of arguments in the `...` be `n`.
    1616   d. Let the set of variables mentioned in the `deriving` clause but not locally scoped (that is, they are also mentioned in the `data` declaration head) be `as`.
    17    e. It is an error if any variable in `as` is mentioned in any of the last `n` arguments in the `data` declaration head.
     17   e. It is an error if any variable in `as` is mentioned in any of the last `n` arguments in the `data` declaration head. Data family instances need [http://git.haskell.org/ghc.git/blob/7ac22b73b38b60bc26ad2508f57732aa17532a80:/compiler/typecheck/TcDeriv.hs#l747 even more checks].
    1818   f. Drop the last `n` arguments (whether visible or invisible) to the datatype. Call the result `ty`.
    1919   g. Replace any type variables in `ty` but '''not''' mentioned in the `deriving` clause with fresh unification variables.