Commit 6002b239 authored by Ronny Wichers Schreur's avatar Ronny Wichers Schreur 🏘
Browse files

expand macros in dynamic expressions

parent df6226ee
......@@ -1599,6 +1599,9 @@ where
expand (MatchExpr cons_symb expr) ei
# (expr, ei) = expand expr ei
= (MatchExpr cons_symb expr, ei)
expand (DynamicExpr dyn) ei
# (dyn, ei) = expand dyn ei
= (DynamicExpr dyn, ei)
expand expr ei
= (expr, ei)
......@@ -1700,6 +1703,12 @@ where
# (dp_rhs, ei) = expand dp_rhs ei
= ({ dyn_pattern & dp_rhs = dp_rhs }, ei)
instance expand DynamicExpr
where
expand (dyn=:{dyn_expr}) ei
# (dyn_expr, ei) = expand dyn_expr ei
= ({dyn & dyn_expr = dyn_expr}, ei)
instance expand [a] | expand a
where
expand [x:xs] ei
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment