Haskell Solution Template