• Simon Peyton Jones's avatar
    Don't split the arg types in a PatSyn signature · 03d89603
    Simon Peyton Jones authored
    This patch fixes Trac #11977, and #12108, rather satisfactorily
    maily by deleting code!
    
      pattern P :: Eq a => a -> a -> Int
    
    The idea is simply /not/ to split the bit after the '=>' into the
    pattern argument types, but to keep the (a->a->Int) part
    un-decomposed, in the patsig_body_ty field of a TcPatSynInfo.
    
    There is one awkward wrinkle, which is that we can't split the
    implicitly-bound type variables into existential and universal until
    we know which types are arguments and which are part of the result.
    So we postpone the decision until we have the declaration in hand.
    See TcPatSyn Note [The pattern-synonym signature splitting rule]
    03d89603
TcPatSyn.hs 42.6 KB