Support for computations which consume random values.
0.5.1.1 (21 May 2018)
Only depend on
failpackage when GHC < 8.0.
0.5.1 (9 February 2017)
and hence also from
Hackage r1: allow
0.5 (3 January 2017)
This release has quite a few small additions as well as a big module reorganization. However, thanks to module re-exports, most existing code using the library should continue to work with no changes; the major version bump reflects the large reorganization and my inability to 100% guarantee that existing user code will not break.
The biggest changes that may be of interest to users of the library
include new lazy vs strict variants of the
Rand monad; a new
MonadInterleave class which is a big improvement over
PrimMonad instances; and new random selection
uniformMay, etc.. See
the list below for full details.
Although there was some discussion of generalizing
work for a wider range of underlying generators
comments on this blog post),
I decided to punt on that for now. It seems rather complicated and
already good alternatives so
I decided to keep things simple for this release. I'm still open to
proposals for generalizing future releases.
Changes in 0.5 include:
- Refactor to reflect structure of
- Add lazy and strict variants of
- Add (but do not export)
fromListnow raises an error when the total weight of elements is zero.
- Generalize the type of
uniformto work over any
- Add new operations
fromListbut generalized to work over any
Mayvariants return a
Mayberesult instead of raising an error.
MonadInterleaveclass for random monads which can interleave random generation using
split. In some ways this is similar to
MonadSplitbut much more useful.
- Improved documentation.
0.4.2.3 (21 April 2016)
0.4.2.2 (18 January 2016)
0.4.2.1 (16 January 2016)
0.4.2 (16 January 2016)
0.4.1 (20 November 2015)
Monad mconstraint from
This should again technically require a major version bump, but I'm not doing it this time in the interest of not being super annoying. If this breaks something for you, just yell, and I will deprecate this version and do a proper 0.5 release.
0.4 (12 May 2015)
RandomGen gconstraints from
A major version bump is required by the PVP since the types of all the above methods have changed, but this release is again very unlikely to break any client code.
0.3.0.2 (30 March 2015)
transformers-compatto allow building with newer
0.3.0.1 (24 November 2014)
Improve documentation: ranges are exclusive at the upper bound
0.3 (4 September 2014)
- Eta-reduce definition of
- Remove unnecessary
Random aconstraint from types of
Note that a major version bump is required by the PVP since the
liftRandT have changed, but this release
is highly unlikely to break any client code.
0.2.0.1 (24 August 2014)
Allow building with both
0.2 (20 August 2014)
newtypeto a type synonym
- strict variants of
- both lazy and strict variants of
- remove unneeded
0.1.13 (9 February 2014)
uniformfunction for creating a uniform distribution over a list of values
0.1.12 (30 September 2013)
liftRandfunctions, for lifting explicit generator-passing functions into
0.1.11 (1 August 2013)
MonadWriterinstances instead of declaring them explicitly (thanks again to James Koppel)
0.1.10 (16 July 2013)
ContT(thanks to James Koppel for the patch)
0.1.9 (26 April 2013)