Skip to content
This repository has been archived by the owner on May 24, 2018. It is now read-only.

The Arrow class is redundant #9

Closed
ekmett opened this issue Sep 24, 2015 · 3 comments
Closed

The Arrow class is redundant #9

ekmett opened this issue Sep 24, 2015 · 3 comments

Comments

@ekmett
Copy link

ekmett commented Sep 24, 2015

An Arrow isn't a Strong Category with extra stuff, it is precisely Strong + Category.

There isn't anything gained by having a separate class except now a risk that someone might have a constraint that requires it and which isn't satisfied by the logically equivalent pair of Strong and Category constraints.

If the purescript equivalent of UndecidableInstances works correctly here you could just make one instance for Arrow and call it good as a shorthand.

@paf31
Copy link
Contributor

paf31 commented Sep 24, 2015

Yes, this library has been shrinking ever since purescript-profunctors came into existence. Now that we have Star, it probably makes sense to add Costar, deprecate (Co)Kleisli and move Static out.

Are there Profunctor versions of ArrowZero and ArrowPlus? (Not that we currently use them anywhere...)

@paf31
Copy link
Contributor

paf31 commented Sep 24, 2015

Or, yes, the UndecidableInstances approach should work too.

@ekmett
Copy link
Author

ekmett commented Sep 25, 2015

ArrowZero is a 'unit first' sort of definition, as such I tend to avoid defining things that way. I've found it tends to be less useful than I'd want. Mathematicians don't like writing down a unit then looking for operations that work with that unit. On the other hand an associative operation is useful even without a unit. With Arrow underneath it at least has the multiplicative structure to be cancellative for, though.

Modulo superclasses ArrowPlus (without ArrowZero) is basically a sum-based variant of the both based Wander type.

This gets pretty granular if you let it. ;)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants