solveRPN in Haskell