[Haskell] specification of sum