Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

search for haskell functions in libraries by providing input/output examples

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 HaltaVista
Octocat-spinner-32 LICENSE
Octocat-spinner-32 Main.hs
Octocat-spinner-32 README.md
Octocat-spinner-32 Setup.hs
Octocat-spinner-32 haltavista.cabal
README.md

Haltavista

Search for haskell functions in installed libraries by providing input/output examples.

Requirements

Hoogle has to be installed.

Usage

Example session 1:

brauner@worf:~$ haltavista
2 2 4
<EOF>

Prelude (*)
Prelude (+)
Prelude (^)

Example session 2 (refining search 1):

brauner@worf:~$ haltavista
2 2 4
1 2 3
<EOF>

Prelude (+)

Example session 3 (higher-order functions):

brauner@worf:~$ haltavista 
(+1) (+2) (1,1) (2,3)
<EOF>

Data.Graph.Inductive.Query.Monad (><)

Credits

Under the hood, uses:

  • hint for type inference;
  • hoogle to get a list of candidate functions;
  • hint for testing.

Hoogle calling facility has been copy-pasted (and later modified) from the Yi project.

Todo

  • catch stack overflows (is that possible?)
  • catch other errors (should do but doesn't for some reason)
Something went wrong with that request. Please try again.