ref: dda68ddb858f384a2d660af1f46b9f928bb048fb
dir: /tests/Readline.hs/
module Readline(main) where
import Prelude
import System.Console.SimpleReadline
main :: IO ()
main = do
  putStrLn "Type 'quit' to quit."
  loop
loop :: IO ()
loop = do
  s <- getInputLineHist "hist.txt" "% "
  case s of
    Just "quit" -> putStrLn "Bye"
    _ -> do putStrLn $ showMaybe showString s; loop