X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=NormalizeTypes.hs;h=5c7c24a6e1623805f255c2f61e0122e83709e68d;hb=17fa4b76161e0b6916f50aaacc2aeb2b6fc21993;hp=e959bbba42fe5e067278668cfca6ce1c048e3450;hpb=570e26f7870fffb1b08fcf44c972b2152d942fc6;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git 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