I don't know much about haskell, but essentially your are going to want to do an expression tree traversal.
the tree is
EXP: (operator) (EXP) (EXP)
EXP: (const)
EXP: (var)
then your simplify becomes
heres the psuedo code
simplify(Exp e)
if (e is const) return e
else if (e is var) return e
else
{//encode simplification rules
Exp left = simplify(e.left)
Exp right = simplify(e.right)
if(operator is PLUS)
{
if(left == 0) return right;
if(right == 0) return left;
}
else if(operator is MULT)
{
if(left == 1) return right;
if(right == 1) return left;
if(left == 0) return 0;
if(right == 0) return 0;
}
//and so on for other operators
}
this is sort of java esque but i think the idea is there, essentially youre going to have to do a tree traversal.