File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
grin/src/Transformations/ExtendedSyntax Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -150,6 +150,18 @@ instance Convertible Exp New.Exp where
150150 | EBind (SReturn (Var var')) (ConstTagNode tag args) rhs2 <- rhs1
151151 , var == var'
152152 -> pure $ New. EBindF lhs1 (oldNodeToAsPat tag args var) rhs2
153+ {- NOTE:
154+ v.0 <- pure <value>
155+ <pat> <- pure v.0 -- pat is neither a node pat nor a var pat
156+ <rhs2>
157+
158+ v.0 <- pure <value>
159+ <rhs2>
160+ -}
161+ | EBind (SReturn (Var var')) valPat rhs2 <- rhs1
162+ , isn't _Var valPat
163+ , var == var'
164+ -> pure $ New. EBindF lhs1 (New. VarPat $ convert var) rhs2
153165 {- NOTE: In this case, v.0 has been defined earlier in the program.
154166 This is a more general case that covers the one before as well.
155167
You can’t perform that action at this time.
0 commit comments