knrafto / email-header

A Haskell library for parsing and rendering email and MIME headers
Other
2 stars 5 forks source link

update to modern GHC #2

Closed cblp closed 8 years ago

cblp commented 8 years ago

and fix some warnings

knrafto commented 8 years ago

Thanks a lot! As you can tell I haven't touched this in a while. It looks like Travis can't compile it though - does it work for you?

cblp commented 8 years ago

Yes, tests are passed for me locally. I use stack test. We can add stack support travis using http://docs.haskellstack.org/en/stable/travis_ci/

cblp commented 8 years ago

Ah, Travis uses GHC installed in Ubuntu, so it is old a little. The best solution would be to test on different GHC versions, I think.

cblp commented 8 years ago

Should I try to add stack support in this branch?

knrafto commented 8 years ago

Specifying base >= 4.8 in the cabal file might be sufficient, since that's when Data.Monoid was added to Prelude. I can't push to your branch, so could you try it out?

cblp commented 8 years ago

Done. I also increased version, because dropping support for base < 4.8 may break something.

knrafto commented 8 years ago

Hmm, it's still failing. The tests pass locally for me too, so I'll merge this and try to figure out Travis later. Thanks for the PR!

cblp commented 8 years ago

Ubuntu already has its system base package, and cabal-install can't install another version.

cblp commented 8 years ago

Could you please release this to Hackage?

knrafto commented 8 years ago

Yeah, I'll get to it later today!

knrafto commented 8 years ago

Uploaded: http://hackage.haskell.org/package/email-header-0.4.0

Gabriella439 commented 8 years ago

You can support older versions of base without incurring unused import warnings for newer versions of base by using the following CPP:

#if MIN_VERSION_base(4,8,0)
#else
import Data.Monoid
#endif