Changes between Version 1 and Version 2 of Commentary/Compiler/DeriveFunctor


Ignore:
Timestamp:
Jun 24, 2015 4:10:22 AM (5 years ago)
Author:
RyanGlScott
Comment:

Clarify deriving Functor condition

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Compiler/DeriveFunctor

    v1 v2  
    200200
    201201   Note that there are two exceptions to this rule: tuple and function types.
    202 4. The data type cannot use {{{-XDatatypeContexts}}}. For example, {{{data Ord a => O a = O a deriving Functor}}} would be rejected.
     2024. The data type's last type variable cannot used in a {{{-XDatatypeContexts}}} constraint. For example, {{{data Ord a => O a = O a deriving Functor}}} would be rejected.
    2032035. The data type's last type variable must be truly universally quantified, i.e., it must not have any class or equality constraints. This means that the following is legal:
    204204