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

collect functions that produce/consume a type #279

Open
jwaldmann opened this issue Nov 12, 2018 · 2 comments
Open

collect functions that produce/consume a type #279

jwaldmann opened this issue Nov 12, 2018 · 2 comments

Comments

@jwaldmann
Copy link

proposal, see https://mail.haskell.org/pipermail/haskell-cafe/2018-November/130191.html

@ndmitchell
Copy link
Owner

Yes, this is something I'd like. I envisage something like _ -> T to be produces T, and T -> _ to be consumes T.

@jwaldmann
Copy link
Author

jwaldmann commented Feb 13, 2019

The consumer can be _ -> ... -> T -> ... -> _, i.e., there is some nested left context t1 -> (t2 -> ...) that contains a consumer T -> .... But we would get this by currying automatically (hoogle already does this)?

Then one could think of (T, _) -> _, in general, the type T we want is some deep argument of nested type constructors. Generalized, it's about covariant vs. contravariant argument positions ... that's the distinction we are already making for -> ?

I'd be happy with any variant that works.

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