Skip to content
  • Simon Peyton Jones's avatar
    Pattern synonyms and higher rank types · c9977385
    Simon Peyton Jones authored
    This patch fixes two separate bugs which contributed to making
    Trac #13752 go wrong
    
    1.  We need to use tcSubType, not tcUnify,
        in tcCheckPatSynDecl.tc_arg.
    
        Reason: Note [Pattern synonyms and higher rank types]
    
    2.  TcUnify.tc_sub_type had a special case designed to improve error
        messages; see Note [Don't skolemise unnecessarily].  But the
        special case was too liberal, and ended up using unification
        (which led to rejecting the program) when it should instead taken
        the normal path (which accepts the program).
    
        I fixed this by making the test more conservative.
    c9977385