<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>hi<BR>&nbsp;<BR>I have a function parseInt... which needs an error guard for when the input is not an Int.<BR>&nbsp;<BR>parseInt :: Parser<BR>parseInt [] = []<BR>parseInt xs = let (digits, rest) = span isDigit (removeSpace xs)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; in [(EInt (read digits), removeSpace rest)]<BR>&nbsp;<BR>Also... I have a function that does this... parseBinaryOp "+" "(5 + 2) if"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; gives...[(Int 5, Int 2, "if")]<BR>so, op is '+' or "&amp;&amp;". I am unsure of how to begin... <BR>&nbsp;<BR>parseBinaryOp :: String -&gt; String -&gt; [(Expr, Expr, String)]<BR>parseBinaryOp op str<BR>&nbsp;<BR>Thankyou<BR>&nbsp;<BR>Ryan<br /><hr />Are you the Quizmaster?  <a href='http://specials.uk.msn.com/brainbattle' target='_new'>Play BrainBattle with a friend now!</a></body>
</html>