Skip to content
  • Sebastian Graf's avatar
    Fix #17112 · bf5c4c19
    Sebastian Graf authored and Ben Gamari's avatar Ben Gamari 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.
    
    (cherry picked from commit a308b435)
    bf5c4c19