shithub: MicroHs

ref: 2ac265704e87b49196c3fb6cd84d63f15f06ba05
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 }