haltavista: looks for functions given a set of example input/outputs

[ development, gpl, program ] [ Propose Tags ]

Looks for functions in the local hoogle library given a set of example input/outputs. Requires hoogle.


~$ haltavista
input_1_1 ... input_1_n output_1
input_m_1 ... input_m_n output_m

Example usage:

~$ haltavista
1 1 2
1 2 3

Prelude (+)

See README.md for more examples.

[Skip to Readme]
Versions [RSS] [faq] 0.1,
Dependencies base (==4.*), hint (>=, process (>= [details]
License GPL-2.0-only
Copyright Paul Brauner and Jun Inoue
Author Paul Brauner Jun Inoue
Maintainer polux2001@gmail.com
Category Development
Uploaded by PaulBrauner at 2010-09-19T15:35:03Z
Distributions NixOS:
Executables haltavista
Downloads 1827 total (18 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs not available [build log]
Last success reported on 2016-12-28 [all 8 reports]


Maintainer's Corner

For package maintainers and hackage trustees


Readme for haltavista-

[back to package description]


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


Hoogle has to be installed.


Example session 1:

brauner@worf:~$ haltavista
2 2 4

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

Example session 2 (refining search 1):

brauner@worf:~$ haltavista
2 2 4
1 2 3

Prelude (+)

Example session 3 (higher-order functions):

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

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


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.


  • catch stack overflows (is that possible?)
  • catch other errors (should do but doesn't for some reason)