[Haskell-beginners] Rewriting bits of a data structure