<div dir="ltr">Could this somehow be used with the GHC API, so that it could be embedded as autocomplete in an interpreter / code editor?<div><br></div><div>I am imagining using this with GHC 7.10 Type Holes in IHaskell. To autocomplete, you'd insert a hole ("_"), GHC would be able to tell you the type of the hole, you'd be able to pass it to exference, and then your autocomplete suggestions would be full expressions. Does this sound plausible?</div><div><br></div><div>Sounds like a very cool tool!</div><div>Andrew<br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Apr 26, 2015 at 9:08 AM, lennart spitzner <span dir="ltr"><<a href="mailto:lsp@informatik.uni-kiel.de" target="_blank">lsp@informatik.uni-kiel.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello folks,<br>
<br>
Exference[1] is a Haskell tool for generating expressions from a type,<br>
e.g.<br>
<br>
Input: (Show b) => (a -> b) -> [a] -> [String]<br>
<br>
Output: \ b -> fmap (\ g -> show (b g))<br>
<br>
In contrast to Djinn, the well known tool with the same general<br>
purpose, Exference supports a larger subset of the haskell type system<br>
- most prominently type classes. (Djinn's environment many contain<br>
type classes, but using them in queries will not really work.) This<br>
comes at a cost, however: Exference makes no promise regarding<br>
termination. Where Djinn tells you "there are no solutions", Exference<br>
will keep trying, sometimes aborting a non-ending search with "i could<br>
not find any solutions".<br>
<br>
See [2] for a report about the implementation, capabilities and<br>
limitations.<br>
<br>
[1] <a href="https://github.com/lspitzner/exference" target="_blank">https://github.com/lspitzner/exference</a><br>
[2] <a href="https://github.com/lspitzner/exference/raw/master/exference.pdf" target="_blank">https://github.com/lspitzner/exference/raw/master/exference.pdf</a><br>
<br>
Lennart<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
</blockquote></div><br></div></div></div>