leftToMaybe/rightToMaybe
wren ng thornton
wren at freegeek.org
Sun Aug 11 02:53:23 CEST 2013
On 8/9/13 2:52 AM, Andreas Abel wrote:
> I bet that most imports of Control.Arrow are to make up for an
> impoverished Data.Tuple, and proper arrow programming is the exception.
I, for one, exclusively use the main arrow combinators[1] at (->) for the
purpose of manipulating co/products in the obvious categorical way.
The only time I'd use any other instance of Arrow/ArrowChoice is if that's
the API some library gives me. I'd certainly never define my own instances
because the Arrow class is IMO fundamentally broken. The presence of the
arr method requires that *all* Haskell functions can be embedded into your
category, which makes Arrows unsuitable for any of the subcategories or
DSLs I happen to care about.
I know there are some folks who are really attached to Arrows, but I'd
much rather see Arrow/ArrowChoice abandoned in favor of extending Category
to have subclasses for categories with co/products.
[1] first, second, (&&&), (***), left, right, (|||), (+++)
--
Live well,
~wren
More information about the Libraries
mailing list