Refactor Haskell (introduce names)