The addPeano function switches the arguments in the recursive call. The implementation should be:
addPeano Z b = b
addPeano (S a) b = addPeano a (S b)
The addPeano function switches the arguments in the recursive call. The implementation should be:
addPeano Z b = b
addPeano (S a) b = addPeano a (S b)