Skip to content
  • Ryan Scott's avatar
    Fix #14228 by marking SumPats as non-irrefutable · f4d50a0e
    Ryan Scott authored
    `isIrrefutableHsPat` should always return `False` for unboxed sum
    patterns (`SumPat`s), since they always have at least one other
    corresponding pattern of the same arity (since the minimum arity for a
    `SumPat` is 2). Failure to do so causes incorrect code to be generated
    for pattern synonyms that use unboxed sums, as shown in #14228.
    
    Test Plan: make test TEST=T14228
    
    Reviewers: austin, bgamari, simonpj
    
    Reviewed By: simonpj
    
    Subscribers: simonpj, rwbarton, thomie
    
    GHC Trac Issues: #14228
    
    Differential Revision: https://phabricator.haskell.org/D3951
    f4d50a0e