Sample haskeline function fails under Windows in GHC and ghci

Zoheb Vacheri zoheb.vacheri at
Wed Apr 29 18:09:20 EDT 2009

I am trying to run the sample program here

 import System.Console.Haskeline

 main :: IO ()
 main = runInputT defaultSettings loop
        loop :: InputT IO ()
        loop = do
            minput <- getInputLine "% "
            case minput of
                Nothing -> return ()
                Just "quit" -> return ()
                Just input -> do outputStrLn $ "Input was: " ++ input
The main function fails with *** Exception: Prelude.undefined
Funnily this main function works inside the Winghci GUI.
Has anyone else seen this issue?

-------------- next part --------------
An HTML attachment was scrubbed...

More information about the Haskeline mailing list