Changes between Version 2 and Version 3 of TFvsFD


Ignore:
Timestamp:
Jun 5, 2012 7:20:31 PM (3 years ago)
Author:
illissius
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TFvsFD

    v2 v3  
    8282}}}
    8383
    84 Type synonyms can manipulate constraint kinds but can not use
    85 them. The standard encoding of the above class from FD to
    86 superclass equalities does not work.
     84The standard encoding of the above class from FD to
     85superclass equalities does not work because type instances
     86can't have type variables on the RHS which weren't introduced
     87in the LHS:
    8788
    8889{{{
    8990class (f :<$>: a) ~ b =>  FMap (f :: * -> * -> Constraint) a b
    9091  where type f :<$>: a
    91 instance f a b => FMap f (HJust a) b
    92   where type f :<$>: (HJust a) = HJust b
     92instance f a b => FMap f (HJust a) (HJust b)
     93  where type f :<$>: (HJust a) = HJust b -- error, b not available
    9394}}}
    9495