Skip to content
Snippets Groups Projects
Forked from Glasgow Haskell Compiler / GHC
Source project has a limited visibility.
  • sheaf's avatar
    572fbc44
    isIrrefutableHsPat: consider COMPLETE pragmas · 572fbc44
    sheaf authored and Marge Bot's avatar Marge Bot committed
    This patch ensures we taken into account COMPLETE pragmas when we
    compute whether a pattern is irrefutable. In particular, if a pattern
    synonym is the sole member of a COMPLETE pragma (without a result TyCon),
    then we consider a pattern match on that pattern synonym to be irrefutable.
    
    This affects the desugaring of do blocks, as it ensures we don't use
    a "fail" operation.
    
    Fixes #15681 #16618 #22004
    572fbc44
    History
    isIrrefutableHsPat: consider COMPLETE pragmas
    sheaf authored and Marge Bot's avatar Marge Bot committed
    This patch ensures we taken into account COMPLETE pragmas when we
    compute whether a pattern is irrefutable. In particular, if a pattern
    synonym is the sole member of a COMPLETE pragma (without a result TyCon),
    then we consider a pattern match on that pattern synonym to be irrefutable.
    
    This affects the desugaring of do blocks, as it ensures we don't use
    a "fail" operation.
    
    Fixes #15681 #16618 #22004
Code owners
Assign users and groups as approvers for specific file changes. Learn more.