From 6efda02e8d3eb4c67d033fc2506fb5c76ab8ddfe Mon Sep 17 00:00:00 2001 From: Joe Crayne Date: Wed, 20 Mar 2019 00:22:42 -0400 Subject: signatures --- monkeypatch.hs | 3 +++ 1 file changed, 3 insertions(+) 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 import Comments +trace :: p -> a -> a trace _ = id -- | Pretty print the given tranlation unit, but replace declarations from header files with @#include@ directives. @@ -460,6 +461,7 @@ isFunctionDecl (CFDefExt (CFunDef _ _ _ (CCompound [] _ _) _)) = True isFunctionDecl _ = False +cleanTree :: (Functor f, Data (f b)) => f b -> f Ordering cleanTree d = fmap (const LT) $ everywhere (mkT eraseNodeInfo) $ d transpile :: C2HaskellOptions -> FilePath -> IncludeStack -> CTranslationUnit NodeInfo -> IO () @@ -1172,6 +1174,7 @@ setBody bdy (CDeclExt (CDecl xs ys pos)) = (CFDefExt (CFunDef xs v [] bdy p _ -> CDeclr Nothing [] Nothing [] pos +doesReturnValue :: [CDeclarationSpecifier a] -> Bool doesReturnValue (CTypeSpec (CVoidType _):_) = False doesReturnValue (x:xs) = doesReturnValue xs doesReturnValue [] = True -- cgit v1.2.3