# HG changeset patch # User unc0rr # Date 1468093244 -10800 # Node ID 24f309d75da88fc638776e6727f640f50a5607f7 # Parent 4f44013e33d4411ebf87ac89076df9177fa2c0c8 Use less weird options diff -r 4f44013e33d4 -r 24f309d75da8 tools/pas2c/Pas2C.hs --- a/tools/pas2c/Pas2C.hs Sat Jul 02 17:56:10 2016 +0200 +++ b/tools/pas2c/Pas2C.hs Sat Jul 09 22:40:44 2016 +0300 @@ -1,5 +1,4 @@ {-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE FlexibleContexts #-} module Pas2C where import Text.PrettyPrint.HughesPJ @@ -298,6 +297,7 @@ mapM_ (id2C IOInsert . setBaseType BTUnit) unitIds return $ vcat . map (\i -> text $ "#include \"" ++ i ++ ".h\"") $ uses2List uses where + injectNamespace :: Identifier -> State RenderState () injectNamespace (Identifier i _) = do getNS <- gets (flip Map.lookup . namespaces) modify (\s -> s{currentScope = Map.unionWith (++) (fromMaybe Map.empty (getNS i)) $ currentScope s})