diff options
-rw-r--r-- | monkeypatch.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/monkeypatch.hs b/monkeypatch.hs index 7806f07..e4ccbc1 100644 --- a/monkeypatch.hs +++ b/monkeypatch.hs | |||
@@ -49,6 +49,7 @@ import Text.Show.Pretty | |||
49 | 49 | ||
50 | import Comments | 50 | import Comments |
51 | 51 | ||
52 | trace :: p -> a -> a | ||
52 | trace _ = id | 53 | trace _ = id |
53 | 54 | ||
54 | -- | Pretty print the given tranlation unit, but replace declarations from header files with @#include@ directives. | 55 | -- | Pretty print the given tranlation unit, but replace declarations from header files with @#include@ directives. |
@@ -460,6 +461,7 @@ isFunctionDecl (CFDefExt (CFunDef _ _ _ (CCompound [] _ _) _)) = True | |||
460 | isFunctionDecl _ = False | 461 | isFunctionDecl _ = False |
461 | 462 | ||
462 | 463 | ||
464 | cleanTree :: (Functor f, Data (f b)) => f b -> f Ordering | ||
463 | cleanTree d = fmap (const LT) $ everywhere (mkT eraseNodeInfo) $ d | 465 | cleanTree d = fmap (const LT) $ everywhere (mkT eraseNodeInfo) $ d |
464 | 466 | ||
465 | transpile :: C2HaskellOptions -> FilePath -> IncludeStack -> CTranslationUnit NodeInfo -> IO () | 467 | transpile :: C2HaskellOptions -> FilePath -> IncludeStack -> CTranslationUnit NodeInfo -> IO () |
@@ -1172,6 +1174,7 @@ setBody bdy (CDeclExt (CDecl xs ys pos)) = (CFDefExt (CFunDef xs v [] bdy p | |||
1172 | _ -> CDeclr Nothing [] Nothing [] pos | 1174 | _ -> CDeclr Nothing [] Nothing [] pos |
1173 | 1175 | ||
1174 | 1176 | ||
1177 | doesReturnValue :: [CDeclarationSpecifier a] -> Bool | ||
1175 | doesReturnValue (CTypeSpec (CVoidType _):_) = False | 1178 | doesReturnValue (CTypeSpec (CVoidType _):_) = False |
1176 | doesReturnValue (x:xs) = doesReturnValue xs | 1179 | doesReturnValue (x:xs) = doesReturnValue xs |
1177 | doesReturnValue [] = True | 1180 | doesReturnValue [] = True |