Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs confusion - bifunctor/profunctor #2

Open
locallycompact opened this issue Oct 18, 2017 · 1 comment
Open

Docs confusion - bifunctor/profunctor #2

locallycompact opened this issue Oct 18, 2017 · 1 comment

Comments

@locallycompact
Copy link

Hi, I was confused at this line:

"The constructor :->, which is used to concatenate successive stages into a pipeline, is isomorphic to (,)."

That would make it a bifunctor, whereas I would expect a pipeline arrow such as this to be an actual Arrow and hence a profunctor, i.e contravariant in the first argument. Should this not be the case? Am I misunderstanding something? Might it be possible to make it explicitly an Arrow to gain access to the Arrow and ArrowChoice combinators?

@jbedo
Copy link
Member

jbedo commented Oct 20, 2017

The confusion here is that the abstraction is at a higher level than typical. The value of a :-> b is a place holder, the type and its associated typeclass instances are what determines the pipeline, and in fact the pipeline is totally erased during compile time. So it isn't a functor of any kind in the Haskell sense as the value is never used.

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

No branches or pull requests

2 participants