I am getting a matching error:
Expression : parseExpr (append p e) es
Term : parseExpr
Type : Expr -> String
Does not match : a -> b -> c
when I try executing this code in the marked line:
data Expr = Atom String | Var String | Pred String [Expr] | Expr String
append :: String -> String -> String
append a b = a++b
parseExpr :: Expr -> String
parseExpr (Atom a) = a
parseExpr (Var x) = x
parseExpr (Pred p (e:es)) = parseExpr (append p e) es -- ERROR HERE
Although e is always going to be a String from the Expr object definition that I stated above. Is there a way to state this?