tahoe-lafs / zfec

zfec -- an efficient, portable erasure coding tool
Other
373 stars 44 forks source link

Haskell binding parameter validation fixes #83

Closed exarkun closed 1 year ago

exarkun commented 1 year ago

This adjusts the input validation done by the Haskell bindings to allow n == k, which is supported by the C library and allowed by the Python bindings to that library. Notably, Tahoe-LAFS also allows users to configure n == k so Tahoe-LAFS depends on this functionality.

This also comes with a rewrite of most of the test suite for the Haskell bindings to use QuickCheck and more thoroughly exercise the relevant code.

This also comes with a Nix flake that can build the package and provides a dev environment that includes build dependencies and other developer-oriented tools (notably haskell-language-server).

There is also a .envrc that automatically enables the Flake-supplied dev environment, for anyone who wants to use direnv.

This also includes an update of the cabal file because the version in the repository was not readable by a reasonable version of cabal that I could get my hands on (due to its age).