Why isn?t (>>>) a method?

David Menendez dave at zednenem.com
Wed Nov 26 17:12:30 EST 2008

On Wed, Nov 26, 2008 at 4:38 PM, Ross Paterson <ross at soi.city.ac.uk> wrote:
> On Wed, Nov 26, 2008 at 04:02:36PM -0500, David Menendez wrote:
>> I also think trying to shoe-horn a new, incompatible definition for
>> Arrow into a base-3.0.* release was a mistake. The whole point of
>> having a versioning policy is lost if you don't follow it. Given how
>> isolated Arrow is in the standard libraries, they could have just
>> created a new class and deprecated the old one without causing much
>> fuss.
> It is isolated in base, but it's also wired into GHC.  The whole point
> of base-compat is to present a different view of the same entities,
> so that packages using the base-3 interface and those using the base-4
> interface can be combined.  There was no way that could work with a
> changed Arrow class.

But now base-3 isn't compatible with *itself*.

I see no reason why GHC couldn't use a mechanism like rebindable
syntax to support two Arrow classes. I'm free to define my own version
of Monad and use the do-synax with it. Besides, the arrow syntax
already requires a language extension; we could just provide a
different pragma for neo-Arrows. The old and new Arrow classes could
coexist perfectly fine.

Of course, Arrow libraries would end up needing a bunch of boilerplate
to provide instances for both classes. Whether that's preferable to
conditional compilation may be a matter of taste.

Dave Menendez <dave at zednenem.com>

More information about the Libraries mailing list