<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1400" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>Hi,</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>When I run my main function I get an error:</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>The prompt does not wait for user input and thus my parser
fails with an empty head.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Is there a switch to not echo to the console? Is this
the problem? It happens in both Hugs and GHC</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>main :: IO ()<BR>main = do
<BR> putStr "sentence?
"<BR> input <-
getLine<BR> case input
of<BR> "quit" ->
putStr "bye.\n"<BR>
_ -> do
<BR>
let res = get_result $
proof $ do_proof $ getInput input<BR>
in if res ==
Nothing<BR>
then putStr ("->
Nothing\n")<BR>
else putStr ("-> " ++ (show $ unJust
res) ++ "\n")<BR>
main<BR></FONT></DIV>
<DIV><FONT size=2>----</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Sample output:</FONT></DIV>
<DIV><FONT size=2>START></FONT></DIV>
<DIV><FONT size=2>$ mmccg.exe</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>sentence?</FONT></DIV>
<DIV><FONT size=2>Fail: Prelude.head: empty list</FONT></DIV>
<DIV><FONT size=2><END</DIV></FONT>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV></BODY></HTML>