Hi all, I am having problems adding multiple definitions with where for
example in my code
--A parser for recognising binary operations
parseBinaryOp :: String - String - [(Expr, Expr, String)]
parseBinaryOp op str
| (elem op binops) (notElem '(' (snd bm)) (notElem ')' (snd bm))
insertjokehere wrote:
Hi all, I am having problems adding multiple definitions with where for
example in my code
--A parser for recognising binary operations
parseBinaryOp :: String - String - [(Expr, Expr, String)]
parseBinaryOp op str
| (elem op binops) (notElem '(' (snd bm))
insertjokehere wrote:
where bm = bracketMatch str
nstr = words (snd (bracketMatch str))
It looks like you have set your editor to make tabs look like four
spaces. Haskell compilers are required to interpret tabs as being
equivalent to eight spaces, so it
insertjokehere wrote:
--A parser for recognising binary operations
parseBinaryOp :: String - String - [(Expr, Expr, String)]
parseBinaryOp op str
| (elem op binops) (notElem '(' (snd bm)) (notElem ')' (snd bm))
(elem nstr!!1 binops) = [(EInt 1, EInt 1, HERE!)]
You want (elem (nstr