
Hi,
* Couldn't match expected type `t0 Char' with actual type `Char' * In the second argument of `elem', namely `x' In the second argument of `($)', namely '-' `elem` x In the expression: not $ '-' `elem` x
Hope the other answers helped. FWIW, just wanted to point out that for me these kinds of error messages sometimes used to be confusing since the type of `elem` is `(Foldable t, Eq a) => a -> t a -> Bool`, so the typechecker tells you it wants to unify `t0 Char` (where `t0` is something `Foldable`) with `Char`. As Mr. Klink wrote, it looks like you wanted `t0` to be `[]`; I used to get confused since I was only working with lists and the extra `Foldable` genericity made it harder to see that I was still just working with lists. Best, toz
participants (1)
-
鲍凯文