ekmett / profunctors

Haskell 98 Profunctors
http://hackage.haskell.org/package/profunctors
Other
70 stars 43 forks source link

Add arrow-related instances #111

Closed mniip closed 4 months ago

mniip commented 4 months ago

We know that:

The WrappedArrow class allows using profunctors classes with types that only implement base arrows instances. However since profunctors depends on base, the expectation is that anything that is a Strong Category should also be an Arrow, etc, else you can't use arrow syntax!

Hence I've added the following instances:

Things like Category (Pastro p) require Strong p at which point Pastro p <-> p and if you want an arrow you can just extract, so I've decided to not bother with that. Likewise with Category (FreeTraversing p).