hoogle icon indicating copy to clipboard operation
hoogle copied to clipboard

collect functions that produce/consume a type

Open jwaldmann opened this issue 7 years ago • 2 comments

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

jwaldmann avatar Nov 12 '18 12:11 jwaldmann

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

ndmitchell avatar Feb 13 '19 11:02 ndmitchell

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.

jwaldmann avatar Feb 13 '19 20:02 jwaldmann