You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
th-desugar does not currently support or-patterns (introduced in GHC 9.12), and attempting to desugar an or-pattern will result in an error. In order to support or-patterns, we will need to answer the following questions:
Should we add a DOrP constructor to DPat, or should we attempt to desugar or-patterns into simpler patterns (à la match flattening)? See this issue.
Relatedly, GHC flattens matches on or-patterns by desugaring them into view patterns (see this Note), but th-desugardoesn't support view patterns. How should match flattening be handled on the th-desugar side?
How should we handle an as-pattern such as p@(A ; B ; C)? Note that or-patterns are not invertible, which means that they are susceptible to this issue.
The text was updated successfully, but these errors were encountered:
Handling or-patterns in full generality is tricky (see #232), so for now, we
simply error if we attempt to desugar an or-pattern.
Checks off one box in #231.
Handling or-patterns in full generality is tricky (see #232), so for now, we
simply error if we attempt to desugar an or-pattern.
Checks off one box in #231.
th-desugar
does not currently support or-patterns (introduced in GHC 9.12), and attempting to desugar an or-pattern will result in an error. In order to support or-patterns, we will need to answer the following questions:DOrP
constructor toDPat
, or should we attempt to desugar or-patterns into simpler patterns (à la match flattening)? See this issue.th-desugar
doesn't support view patterns. How should match flattening be handled on theth-desugar
side?p@(A ; B ; C)
? Note that or-patterns are not invertible, which means that they are susceptible to this issue.The text was updated successfully, but these errors were encountered: