The fast-combinatorics package

[ Tags: bsd3, library, numerics ] [ Propose Tags ]

Fast combinatorics code with a high level of safety guaranteed by writing it in ATS.

[Skip to Readme]


Dependencies base (>=4.7 && <5), composition-prelude (>= [details]
License BSD3
Copyright Copyright: (c) 2017 Vanessa McHale
Author Vanessa McHale
Category Numerics
Home page
Source repository head: git clone
Uploaded Tue Jan 2 06:12:41 UTC 2018 by vmchale
Distributions NixOS:
Downloads 726 total (726 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2018-01-02 [all 1 reports]
Hackage Matrix CI





Enable -Werror


Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info


Maintainer's Corner

For package maintainers and hackage trustees

Readme for fast-combinatorics-

[back to package description]


Build Status

This is a library for fast combinatorics using ATS. As such, make sure a C compiler is installed. It may not work on windows, so if you run into bugs building this please open an issue.


| Computation | Version (ATS/Haskell) | Time | | ----------- | --------------------- | ---- | | isPrime 2017 | ATS | 118.9 ns | | isPrime 2017 | Haskell | 497.3 ns | | φ(2016) | ATS | 5.574 μs | | φ(2016) | Haskell | 177.3 μs | | τ(3018) | ATS | 7.962 μs | | τ(3018) | Haskell | 35.87 μs |


The Haskell library comes with the C bundled, however you may wish to build from source if you are hacking on the library. To that end, you can install stack, patsopt, and pats-filter and build with

 $ ./shake.hs

You will also likely want to install GHC as well as cabal.


Using the ATS library

One of the nice things about a Haskell wrapper is that some of Haskell's tooling/libraries may be used. You may want to try the REPL:

 $ cabal new-repl

Using the Haskell library

You may wish to read the ATS source code for an indication of what sorts of things ATS allows us to prove things about our programs, particularly proofs of termination.