Changes between Version 8 and Version 9 of InferDatatypeContexts


Ignore:
Timestamp:
Sep 25, 2014 3:08:23 PM (5 years ago)
Author:
yokto
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • InferDatatypeContexts

    v8 v9  
    5757  Just make the type signature of the constructor {{{(Eq a) => a -> HasEq a}}}
    58582. Explicit type signature {{{(undefined :: HasEq a)}}}:
    59   Add the constraint {{{(Eq a)}}} to all explicit type signatures containing {{{HasEq a}}}.
    60   If you have more variables {{{HasEq (Either a b)}}} use the inner most forall in which one of the variables is bound
     59  For all free variables in {{{HasEq (...)}}} add {{{Eq (...)}}} to the context where the variable is bound.
    6160
    62   {{{ (forall a. HasEq (Either a b) -> c) -> c -> b }}}
    63   becomes
    64 
    65   {{{ (forall a. (Eq (Either a b))  => HasEq (Either a b) -> c) -> c -> b }}}
    66 
    67   Listing of all cases where explicit types appear.
     61  Listing of all places where explicit types appear.
    6862  * Haskell98
    6963    * {{{type simpletype = type}}}
     
    9084  * Extensions:
    9185    * Explicit forall RankNTypes, Imporedicative types.
    92       For all free variables in {{{HasEq (...)}}} place a context where the variable is bound
     86      For all free variables in {{{HasEq (...)}}} add {{{Eq (...)}}} to the context where the variable is bound
    9387      e.g.
    9488      {{{