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

Ben Gamari ben at smart-cactus.org
Thu Oct 8 13:55:13 UTC 2015


Michael Orlitzky <michael at orlitzky.com> writes:

> (replying to no one in particular)
>
> This problem isn't specific to Haskell. In every other language, you
> have projects that support major versions of toolkits, compilers,
> libraries and whatnot. And there's already a tool for it: git.
>
> 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 don't find this option terribly appealing. As a maintainer I would far
prefer maintaining a bit of CPP than a proliferation of branches, with
all of the cherry-picking and potential code divergence that they
bring.

Really though, the point I've been trying to make throughout is that I
think that much of the CPP that we are currently forced to endure isn't
even strictly necessary. With a few changes to our treatment of warnings
and some new pragmas (aimed at library authors), we can greatly reduce
the impact that library interface changes have on users.

Cheers,

- Ben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 472 bytes
Desc: not available
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20151008/f6e87f8b/attachment.sig>


More information about the Haskell-Cafe mailing list