From 17fa4b76161e0b6916f50aaacc2aeb2b6fc21993 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Sun, 21 Jun 2009 16:49:36 +0200 Subject: [PATCH] Add getGlobalBinders accessor. --- NormalizeTypes.hs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/NormalizeTypes.hs b/NormalizeTypes.hs index e959bbb..5c7c24a 100644 --- a/NormalizeTypes.hs +++ b/NormalizeTypes.hs @@ -47,3 +47,9 @@ getGlobalBind bndr = do -- Adds a new global binding with the given value addGlobalBind :: CoreBndr -> CoreExpr -> TransformSession () addGlobalBind bndr expr = modA tsBindings (Map.insert bndr expr) + +-- Returns a list of all global binders +getGlobalBinders :: TransformSession [CoreBndr] +getGlobalBinders = do + bindings <- getA tsBindings + return $ Map.keys bindings -- 2.30.2