Catch-all aliases working again
[hcoop/domtool2.git] / src / reduce.sml
index 5d7a1b9..525d713 100644 (file)
@@ -133,7 +133,12 @@ fun reduceExp G (eAll as (e, loc)) =
        end
       | EVar x =>
        (case lookupEquation G x of
-            NONE => eAll
+            NONE =>
+            (case function x of
+                 NONE => eAll
+               | SOME f => case f [] of
+                               NONE => eAll
+                             | SOME e' => reduceExp G e')
           | SOME e => reduceExp G e)
       | EApp (e1, e2) =>
        let