Skip to content
  • Sebastian Graf's avatar
    Fix #17112 · a308b435
    Sebastian Graf authored and Marge Bot's avatar Marge Bot committed
    The `mkOneConFull` function of the pattern match checker used to try to
    guess the type arguments of the data type's type constructor by looking
    at the ambient type of the match. This doesn't work well for Pattern
    Synonyms, where the result type isn't even necessarily a TyCon
    application, and it shows in #11336 and #17112.
    
    Also the effort seems futile; why try to try hard when the type checker
    has already done the hard lifting? After this patch, we instead supply
    the type constructors arguments as an argument to the function and
    lean on the type-annotated AST.
    a308b435