Updating dotted pair in Haskell