diff options
-rw-r--r-- | monkeypatch.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/monkeypatch.hs b/monkeypatch.hs index 5ef58da..d6ff1c2 100644 --- a/monkeypatch.hs +++ b/monkeypatch.hs | |||
@@ -724,7 +724,7 @@ grokStatement fe (CBlockStmt (CWhile cond (CCompound [] bdy _) isDoWhile _)) = d | |||
724 | x = foldr applyComputation c' ss -- continue function | 724 | x = foldr applyComputation c' ss -- continue function |
725 | vs = [] -- Map.keys $ compIntro g | 725 | vs = [] -- Map.keys $ compIntro g |
726 | fin <- StateT $ return . genUnique | 726 | fin <- StateT $ return . genUnique |
727 | return $ fmap (FormalLambda fin) $ fmap (factorOutFunction "continue" vs (comp x) (hsvar " continue")) g | 727 | return $ fmap (FormalLambda fin . factorOutFunction "continue" vs (comp x) (hsvar " continue")) g |
728 | grokStatement fe _ = mzero | 728 | grokStatement fe _ = mzero |
729 | 729 | ||
730 | isFunctionDecl :: CExternalDeclaration a -> Bool | 730 | isFunctionDecl :: CExternalDeclaration a -> Bool |
@@ -988,9 +988,10 @@ hsTypeSpec (CTypeSpec (CTypeDef ctyp _)) = [ L | |||
988 | hsTypeSpec (CTypeSpec (CBoolType _)) = [ Right "Bool"] | 988 | hsTypeSpec (CTypeSpec (CBoolType _)) = [ Right "Bool"] |
989 | hsTypeSpec (CTypeSpec (CIntType _)) = [ Right "Int"] | 989 | hsTypeSpec (CTypeSpec (CIntType _)) = [ Right "Int"] |
990 | hsTypeSpec (CTypeSpec (CCharType _)) = [ Right "Char"] | 990 | hsTypeSpec (CTypeSpec (CCharType _)) = [ Right "Char"] |
991 | hsTypeSpec (CTypeSpec (CDoubleType _)) = [ Right "Double"] | ||
991 | hsTypeSpec (CTypeSpec (CSUType (CStruct CStructTag mctyp Nothing [] _) _)) = maybeToList $ fmap Left mctyp | 992 | hsTypeSpec (CTypeSpec (CSUType (CStruct CStructTag mctyp Nothing [] _) _)) = maybeToList $ fmap Left mctyp |
992 | 993 | ||
993 | hsTypeSpec (CTypeSpec unhandled) = [] -- trace ("hsTypeSpec unhandled: "++ show (const () <$> unhandled)) $ [] | 994 | hsTypeSpec (CTypeSpec unhandled) = trace ("hsTypeSpec unhandled: "++ show (const () <$> unhandled)) $ [] |
994 | hsTypeSpec _ = [] | 995 | hsTypeSpec _ = [] |
995 | 996 | ||
996 | 997 | ||