[Haskell-cafe] find functions that produce / consume a type?

Johannes Waldmann johannes.waldmann at htwk-leipzig.de
Fri Nov 9 09:59:03 UTC 2018


Dear Cafe,

can we automate something like the following

  for any type  T  that appears in signatures (shown by haddock),
  add (separate) lists of "functions that produce T",
  "functions that consume T".

Hoogle can type-search approximately, but
* it would always (want to) match the full type AST
(matching with a subtree incurs a penalty?),
* and not distinguish between producer and consumer?

E.g.,
https://ndmitchell.com/downloads/slides-hoogle_finding_functions_from_types-16_may_2011.pdf
Slide #29 "Per Argument Searching"
uses "search arguments", "search results" -
only to  merge the results immediately.
Can we keep them separate?

- J.W.



More information about the Haskell-Cafe mailing list