[Haskell] strange ghc behaviour?