I'm making a general purpose N-ary tree and im coming up with "unexpected '=' on line 17" as an error. I have spent a fair while trying to work out why this isn't accepting the case that an Empty gtree returns false for any member search. i realise this is probably a very trivial error but any help would be appreciated:<br>
<br>module GTrees where<br><br>data Gtree = Empty |<br> Leaf String |<br> Node String [Gtree] <br> deriving (Show)<br><br>--Tests if a given string is a member of the tree<br><br>gtreeMember :: (Ord a) => a -> Gtree a -> Bool<br>
gtreeMember y Empty = False -- line 17<br> gtreeMember y (Leaf x) = (x==y)<br> gtreeMember y (Node x tree)<br> |x==y = True<br> |otherwise gtreeMember tree<br><br>This is the code up to the point of the error with the error line highlighted<br>
<br>