[Haskell-cafe] Monad of no `return` Proposal (MRP): Moving `return` out of `Monad`

Michael Orlitzky michael at orlitzky.com
Wed Oct 7 18:06:28 UTC 2015

On 10/07/2015 01:48 PM, Francesco Ariis wrote:
> On Wed, Oct 07, 2015 at 01:34:21PM -0400, Michael Orlitzky wrote:
>> Instead of using #ifdef to handle four different compilers, keep a
>> branch for each. Git is designed to make this easy, and it's usually
>> trivial to merge changes from the master branch back into e.g. the
>> ghc-7.8 branch. That way the code in your master branch stays clean.
>> When you want to stop supporting an old GHC, delete that branch.
> I suspect `cabal install your-library` without CPP would explode in
> the face of (some of) your users though.

The different branches would have different cabal files saying with
which version of GHC they work. If the user has ghc-7.8 installed, then
cabal-install (or at least, any decent package manager) should pick the
latest version supporting ghc-7.8 to install.

More information about the Haskell-Cafe mailing list