Skip to content

Commit 01ed583

Browse files
committed
Expand macros more aggressively
1 parent 84b8360 commit 01ed583

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

UDAnnotations.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ catsForPOS env = M.fromListWith (++) $
288288
expandMacro :: UDEnv -> AbsTree -> AbsTree
289289
expandMacro env tr@(RTree f ts) = case M.lookup f (macroFunctions (cncLabels env)) of
290290
Just (MacroFunction _ xx df _) | length ts' == length xx ->
291+
expandMacro env $
291292
subst (zip xx ts') df
292293
_ -> RTree f ts'
293294
where
@@ -296,7 +297,7 @@ expandMacro env tr@(RTree f ts) = case M.lookup f (macroFunctions (cncLabels env
296297
case us of
297298
[] -> maybe t id (lookup h xts)
298299
-- Expand head: #auxfun Ex a b : A -> B -> C = a b ; cn head
299-
_ | Just (RTree h' hus) <- lookup h xts -> expandMacro env $ RTree h' (hus ++ map (subst xts) us)
300+
_ | Just (RTree h' hus) <- lookup h xts -> RTree h' (hus ++ map (subst xts) us)
300301
_ -> RTree h (map (subst xts) us)
301302

302303
----------------------------------------------------------------------------

0 commit comments

Comments
 (0)