Skip to content

Commit b51dc4f

Browse files
committed
Expand macros again after expanding head of macro
This is a hack for allowing macros to change the shape of trees
1 parent 5277bce commit b51dc4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

UDAnnotations.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ expandMacro env tr@(RTree f ts) = case M.lookup f (macroFunctions (cncLabels env
293293
subst xts t@(RTree h us) = case us of
294294
[] -> maybe t id (lookup h xts)
295295
-- Expand head: #auxfun Ex a b : A -> B -> C = a b ; cn head
296-
_ | Just (RTree h' hus) <- lookup h xts -> RTree h' (hus ++ map (subst xts) us)
296+
_ | Just (RTree h' hus) <- lookup h xts -> expandMacro env $ RTree h' (hus ++ map (subst xts) us)
297297
_ -> RTree h (map (subst xts) us)
298298

299299
----------------------------------------------------------------------------

0 commit comments

Comments
 (0)