PTQ-0.0.4: src/Main.hs
-----------------------------------------------------------------------------
-- |
-- Module : Main
-- Copyright : (c) Masahiro Sakai 2007-2009
-- License : BSD3-style (see LICENSE)
--
-- Maintainer: masahiro.sakai@gmail.com
-- Stability : experimental
-- Portability : non-portable
{-# LANGUAGE CPP #-}
module Main where
import Report
#ifdef USE_UTF8
import Prelude hiding (putStr, getLine)
import System.IO hiding (putStr, getLine)
import System.IO.UTF8
#else
import System.IO
#endif
main :: IO ()
main =
do -- FIXME: バナーを表示
hSetBuffering stdout NoBuffering
loop
loop :: IO ()
loop =
do putStr "PTQ> "
s <- getLine
case s of
"quit" -> return ()
_ -> do
putStr (report s)
loop