MIT licensed by Ben Orchard
Maintained by Ben Orchard
This version can be pinned in stack with:mt19937-0.1.1@sha256:3a0f21f1e2e9e1d2e9d324d469c22d4a37b1cbf476a497aada2c77dff5888332,1296

Module documentation for 0.1.1

Depends on 2 packages(full list with versions):

mt19937

Efficient MT19937 (standard 32-bit Mersenne Twister PRNG) implementation, in pure Haskell (no FFI) with a pure interface.

Only the PRNG itself is implemented. If you’d like to use this as a PRNG in any capacity, you’ll need to wrap it into some monad or some such.

Doesn’t seem too useful? You’d be surprised. This was originally written while decoding a file header which was bafflingly encoded using a set-seed MT19937.

License

Provided under the MIT license. See LICENSE for license text.

Changes

0.1.1 (2024-07-14)

  • loosen base lower bounds, can now build with GHC 9.2->9.8 (and maybe 9.10)
  • fix extract erroneously reading from the pre-twist state vector once after twisting (thanks gilgamec)

0.1.0 (2024-03-15)

  • efficient MT19937 (Mersenne Twister) implementation, seemingly correct