@@ -5,6 +5,8 @@ import Core.TT
5import IRTS.Lang
5import IRTS.Lang
6import IRTS.Simplified
6import IRTS.Simplified
7import IRTS.Bytecode
7import IRTS.Bytecode
9import Text.ParserCombinators.Parsec
11import Text.ParserCombinators.Parsec
10import Text.ParserCombinators.Parsec.Error
12import Text.ParserCombinators.Parsec.Error
@@ -47,10 +49,17 @@ fovm f = do defs <- parseFOVM f
47 let tagged = addTags defs
49 let tagged = addTags defs
48 let ctxtIn = addAlist tagged emptyContext
50 let ctxtIn = addAlist tagged emptyContext
49 let checked = checkDefs ctxtIn tagged
51 let checked = checkDefs ctxtIn tagged
50− print checked
52+ -- print checked
51 case checked of
53 case checked of
52 OK c -> do let bc = map toBC c
54 OK c -> do let bc = map toBC c
53− print bc
55+ -- print bc
56+ let h = concatMap toDecl (map fst bc)
57+ let cc = concatMap (uncurry toC) bc
61+ mprog <- readFile (d ++ "/rts/idris_main.c")
55parseFOVM :: FilePath -> IO [(Name, LDecl)]
64parseFOVM :: FilePath -> IO [(Name, LDecl)]
56parseFOVM fname = do putStrLn $ "Reading " ++ fname
65parseFOVM fname = do putStrLn $ "Reading " ++ fname