mainloop parser printer = do
    putStrLn "Please Input some Lojban to Translate"
    input <- getLine

    {-let args = "run_camxes.js -std -m N \"" ++ input ++ "\""
    camxesres <-
        readCreateProcess (shell $ "node " ++ args){cwd = Just camxesPath
        ,std_out = CreatePipe} ""
    putStrLn camxesres-}

    let res = parser input

    case res of
        Just x -> printAtom x
        Nothing -> putStrLn "Parseing Failed."

    mainloop parser printer
    {-case res of
        Left _ -> mainloop parser printer
        Right atom -> do
            (res2 :: Either SomeException String) <- try $ printer atom
            print res2
            mainloop parser printer
-}
mainloop parser printer = do
    putStrLn "Please Input some Lojban to Translate"
    input <- getLine

    {-let args = "run_camxes.js -std -m N \"" ++ input ++ "\""
    camxesres <-
        readCreateProcess (shell $ "node " ++ args){cwd = Just camxesPath
        ,std_out = CreatePipe} ""
    putStrLn camxesres-}

    let res = parser input

    case res of
        Just x -> printAtom x
        Nothing -> putStrLn "Parseing Failed."

    mainloop parser printer
    {-case res of
        Left _ -> mainloop parser printer
        Right atom -> do
            (res2 :: Either SomeException String) <- try $ printer atom
            print res2
            mainloop parser printer
-}
mainloop parser printer = do
    putStrLn "Please Input some Lojban to Translate"
    input <- getLine

    {-let args = "run_camxes.js -std -m N \"" ++ input ++ "\""
    camxesres <-
        readCreateProcess (shell $ "node " ++ args){cwd = Just camxesPath
        ,std_out = CreatePipe} ""
    putStrLn camxesres-}

    let res = parser input

    case res of
        Just x -> printAtom x
        Nothing -> putStrLn "Parseing Failed."

    mainloop parser printer
    {-case res of
        Left _ -> mainloop parser printer
        Right atom -> do
            (res2 :: Either SomeException String) <- try $ printer atom
            print res2
            mainloop parser printer
-}