toC :: (Name, [BC]) -> RWS Int String CState ()
toC (f, code) = do
    modify (\s -> s { fnName = Just f })
    s <- get
    tell $ "void " ++ cname f ++ "(VM* vm, VAL* oldbase) {\n"
    tell $  indent (level s) ++ "INITFRAME;\n"
    bcc code
    tell $ "}\n\n"
toC :: (Name, [BC]) -> RWS Int String CState ()
toC (f, code) = do
    modify (\s -> s { fnName = Just f })
    s <- get
    tell $ "void " ++ cname f ++ "(VM* vm, VAL* oldbase) {\n"
    tell $  indent (level s) ++ "INITFRAME;\n"
    bcc code
    tell $ "}\n\n"
toC (f, code) = do
    modify (\s -> s { fnName = Just f })
    s <- get
    tell $ "void " ++ cname f ++ "(VM* vm, VAL* oldbase) {\n"
    tell $  indent (level s) ++ "INITFRAME;\n"
    bcc code
    tell $ "}\n\n"