summaryrefslogtreecommitdiff
path: root/Intermediate.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Intermediate.hs')
-rw-r--r--Intermediate.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/Intermediate.hs b/Intermediate.hs
index a020509..efa0e40 100644
--- a/Intermediate.hs
+++ b/Intermediate.hs
@@ -64,6 +64,9 @@ termOf (BB _ _ t) = t
class AllRefs a where
allRefs :: a -> [Ref]
+instance AllRefs IRProgram where
+ allRefs (IRProgram bbs _ _) = allRefs bbs
+
instance AllRefs BB where
allRefs (BB _ inss term) =
sortUniq $ concatMap (allRefs . snd) inss ++ allRefs term