[Haskell-cafe] searching a function by providing examples of input/ouput pairs

Jonas Almström Duregård jonas.duregard at gmail.com
Thu Mar 18 10:19:10 EDT 2010


Sounds great!

Here are a few feature requests:

The I/O pair ([-1,4,-6],[1,4,6]) could yield "map abs" as a suggestion :)

The pairs ('a',False) and ('*',True) could yield "not . isAlpha" etc.

I realize that this (at least the composition part) will probably
increase complexity beyond what's acceptable...

/Jonas Duregård

On 18 March 2010 09:13, Paul Brauner <paul.brauner at loria.fr> wrote:
> Hi,
>
> I was looking at hoogle documentation when I remembered that there is
> some nice, but quite unusable, feature of squeak (smalltalk) which
> allows you to search function in the library by giving a list of pairs
> of inputs/ouputs.
>
> When I'm saying that it is quite unusable, I mean that squeak has to try
> _every_ function, some of which may be very slow to deliver a result, or
> require some side effects.
>
> But, piggibacking such a feature on top of hoogle would surely be more
> efficient:
>
>  1. infer types for arguments and outout
>  2. look for matching functions using google
>  3. test them
>
> Has anyone tried that before? If not I would be glad to.
>
> Paul
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>


More information about the Haskell-Cafe mailing list