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

What is the intended way to make a library using FunctorM/fmapM compatible to both GHC-6.4 and GHC-6.8 ?

On Thu, Feb 21, 2008 at 05:39:27AM +0100, Henning Thielemann wrote:
What is the intended way to make a library using FunctorM/fmapM compatible to both GHC-6.4 and GHC-6.8 ?
Just a note, DrIFT 2.2.3 or later (http://repetae.net/computer/haskell/DrIFT/) supports deriving both the Foldable and Traversable classes for arbitrary types, this should alleviate the migration issues somewhat. John -- John Meacham - ⑆repetae.net⑆john⑈

On Wed, 20 Feb 2008, John Meacham wrote:
On Thu, Feb 21, 2008 at 05:39:27AM +0100, Henning Thielemann wrote:
What is the intended way to make a library using FunctorM/fmapM compatible to both GHC-6.4 and GHC-6.8 ?
Just a note, DrIFT 2.2.3 or later (http://repetae.net/computer/haskell/DrIFT/) supports deriving both the Foldable and Traversable classes for arbitrary types, this should alleviate the migration issues somewhat.
I like a solution like Traversable for GHC-6.4 or FunctorM for GHC-6.8 (as packages on Hackage).

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 you also can combine these ideas :) the more interesting question "how to provide compatibility with 7.0, 7.2 and other future ghc versions" :D -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com

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.
participants (3)
-
Bulat Ziganshin
-
Henning Thielemann
-
John Meacham