revc in Haskell