We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8c39025 commit 1bfdb69Copy full SHA for 1bfdb69
grin/src/Transformations/ExtendedSyntax/Optimising/TrivialCaseElimination.hs
@@ -9,6 +9,6 @@ trivialCaseElimination :: Exp -> Exp
9
trivialCaseElimination = ana builder where
10
builder :: Exp -> ExpF Exp
11
builder = \case
12
- ECase scrut [Alt DefaultPat _altName body] -> SBlockF body
13
- ECase scrut [Alt cpat _altName body] -> SBlockF $ EBind (SReturn (Var scrut)) (cPatToAsPat scrut cpat) body
+ ECase scrut [Alt DefaultPat altName body] -> SBlockF $ EBind (SReturn (Var scrut)) (VarPat altName) body
+ ECase scrut [Alt cpat altName body] -> SBlockF $ EBind (SReturn (Var scrut)) (cPatToAsPat altName cpat) body
14
exp -> project exp
0 commit comments