[Haskell-cafe] Multiple statements with Where

2007-12-18 Thread insertjokehere
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))

Re: [Haskell-cafe] Multiple statements with Where

2007-12-18 Thread Jules Bean
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))

Re: [Haskell-cafe] Multiple statements with Where

2007-12-18 Thread Matthew Brecknell
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

Re: [Haskell-cafe] Multiple statements with Where

2007-12-18 Thread Tillmann Rendel
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