shithub: MicroHs

ref: ddd6ef6148a2ea3902b7b80ed89d80cea89acfcf
dir: /ghc/System/Console/SimpleReadline.hs/

View raw version
module System.Console.SimpleReadline(
  getInputLine,
  getInputLineHist
  ) where
import qualified System.Console.Haskeline as H

getInputLine :: String -> IO (Maybe String)
getInputLine prompt =
  H.runInputT H.defaultSettings (H.getInputLine prompt)

getInputLineHist :: FilePath -> String -> IO (Maybe String)
getInputLineHist hist prompt =
  H.runInputT settings (H.getInputLine prompt)
  where settings = H.defaultSettings { H.historyFile = Just hist }