Sample haskeline function fails under Windows in GHC and ghci

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


I am trying to run the sample program here

http://hackage.haskell.org/packages/archive/haskeline/0.6.1.3/doc/html/System-Console-Haskeline.html

 import System.Console.Haskeline

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

Zoheb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.haskell.org/pipermail/haskeline/attachments/20090429/c83c8cbb/attachment.htm 


More information about the Haskeline mailing list