Skip to content


Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Hackage Build Status Windows Build Status licence


Hakaru is a simply-typed probabilistic programming language, designed for easy specification of probabilistic models and inference algorithms. Hakaru enables the design of modular probabilistic inference programs by providing:

  • A language for representing probabilistic distributions, queries, and inferences
  • Methods for transforming probabilistic information, such as conditional probability and probabilistic inference, using computer algebra

It can be used to aid in the creation of machine-learning applications and stochastic modeling to help answer variable queries and distributions.

Warning: This code is alpha and experimental.

For Hakaru documentation, including an installation guide and some sample programs, visit

Contact us at if you have any questions or concerns.

Citing us

When referring to Hakaru, please cite the following academic paper:

P. Narayanan, J. Carette, W. Romano, C. Shan and R. Zinkov, "Probabilistic Inference by Program Transformation in Hakaru (System Description)", Functional and Logic Programming, pp. 62-79, 2016.

	title = {Probabilistic inference by program transformation in Hakaru (system description)},
	author = {Narayanan, Praveen and Carette, Jacques and Romano, Wren and Shan, Chung{-}chieh and Zinkov, Robert},
	booktitle = {International Symposium on Functional and Logic Programming - 13th International Symposium, {FLOPS} 2016, Kochi, Japan, March 4-6, 2016, Proceedings},
	pages = {62--79},
	year = {2016},
	organization = {Springer},
	url = {},
	doi = {10.1007/978-3-319-29604-3_5},