Skip to content
  • Richard Eisenberg's avatar
    Improve implementation of unSubCo_maybe. · a3896ab5
    Richard Eisenberg authored
    This is the result of an email conversation (off list) with
    Conal Elliott, who needed a stronger unSubCo_maybe. This
    commit adds cases to upgrade the role of a coercion when
    recursion is necessary to do say (for example, for a use of
    TransCo). As a side effect, more coercion optimizations are
    now possible.
    
    This was not done previously because unSubCo_maybe was used
    only during coercion optimization, and the recursive cases
    looked to be unlikely. However, adding them can cause no harm.
    
    unSubCo_maybe is now also exported from Coercion, for use
    cases like Conal's.
    a3896ab5