runObjectFile :: Object -> IO ()
runObjectFile obj = do
    let st = DS.new
    --let eResult = runStateT (runObject obj) st
    let eResult = doEM st (runObject obj)
    let (str, st') = case eResult of
                    Left err -> (show err, st)
                    Right (_, st'') -> ("OK", st'')
    print str
    let mOut = doEM st' getStdOut 
    case mOut of 
        Right (Just out, _) -> putStrLn out
        Right _ -> print "Could not get stdout"
        Left err -> print (show err)
runObjectFile :: Object -> IO ()
runObjectFile obj = do
    let st = DS.new
    --let eResult = runStateT (runObject obj) st
    let eResult = doEM st (runObject obj)
    let (str, st') = case eResult of
                    Left err -> (show err, st)
                    Right (_, st'') -> ("OK", st'')
    print str
    let mOut = doEM st' getStdOut 
    case mOut of 
        Right (Just out, _) -> putStrLn out
        Right _ -> print "Could not get stdout"
        Left err -> print (show err)
runObjectFile obj = do
    let st = DS.new
    --let eResult = runStateT (runObject obj) st
    let eResult = doEM st (runObject obj)
    let (str, st') = case eResult of
                    Left err -> (show err, st)
                    Right (_, st'') -> ("OK", st'')
    print str
    let mOut = doEM st' getStdOut 
    case mOut of 
        Right (Just out, _) -> putStrLn out
        Right _ -> print "Could not get stdout"
        Left err -> print (show err)