haskell / c2hs

c2hs is a pre-processor for Haskell FFI bindings to C libraries
http://hackage.haskell.org/package/c2hs
Other
198 stars 50 forks source link

Get ready for AMP and fix a deprecated import #104

Closed int-index closed 10 years ago

int-index commented 10 years ago

As you might be well aware, the Applicative-Monad Proposal is on its second stage, and GHC 7.8 issues a warning if a Monad isn't also an Applicative. Such instances will break in GHC 7.10. So I added those instances where needed, and fixed one deprecated import as well.

A problem that remains is a future name clash:

src/Data/DLists.hs:61:1: Warning:
    Local definition of ‘join’ clashes with a future Prelude name - this will become an error in GHC 7.10, under the Applicative-Monad Proposal.

We can either rename join to append (as in the dlist package), or even switch to using dlist.

int-index commented 10 years ago

I investigated swtching to the dlist library and it was as simple as a few renames -- works perfectly fine (passes all the tests). And it's a safe dependency to introduce, as the package is well maintained. If you agree with this idea, I am ready to open another pull request.

ian-ross commented 10 years ago

@int-index Thanks! Switching to using the dlist package sounds like a good idea, so please do go ahead with another PR for that.