FunctorM.fmapM vs. Traversable with GHC-6.4 and GHC-6.8

Henning Thielemann lemming at henning-thielemann.de
Thu Feb 21 07:39:16 EST 2008


On Thu, 21 Feb 2008, Bulat Ziganshin wrote:

> Hello Henning,
>
> Thursday, February 21, 2008, 7:39:27 AM, you wrote:
>
> > What is the intended way to make a library using FunctorM/fmapM compatible
> > to both GHC-6.4 and GHC-6.8 ?
>
> either
> 1) support two different cabal files and propose users to manually
> rename one they need to .cabal
> 2) suggest 6.4 users to switch to newest cabal version which supports
> config sections and use them
> 3) install library via makefile, custom haskell script or smth like
> this

Whereever possible I tried to achieve compatibility between GHC-6.4 and
GHC-6.8 by fetching the modules from the right packages using 'flag' in
Cabal. However this problem is more delicate because the two related
modules, classes (FunctorM/Traversable) and methods (fmapM/traverse) have
different names.

> the more interesting question "how to provide compatibility with 7.0,
> 7.2 and other future ghc versions" :D

This would have been my next question.


More information about the Libraries mailing list