Debian Codegraph @

CHANGES.markdown

raw
1 0.6.2 (5 March 2025)
2 --------------------
3
4 - Support `random-1.3`. Thanks to @bgamari and @lehins for help
5 making the necessary updates.
6
7 0.6.1 (22 October 2024)
8 -----------------------
9
10 - Fix the potential for a crash in `fromListMay` (and hence also in
11 functions that use it, namely `fromList`, `weighted`, `weightedMay`,
12 `uniform`, and `uniformMay`). Thanks to @Flupp for pointing out the
13 issue and suggesting a fix. The fix may in theory cause these
14 functions, extremely rarely, to output values different from the old
15 values for the same seed. See
16 https://byorgey.github.io/blog/posts/2024/10/14/MonadRandom-version-bump.html
17 for more information and discussion.
18
19 0.6 (5 Nov 2022)
20 ----------------
21
22 - Remove instances for deprecated `ErrorT` and `ListT` transformers
23 - Allow building with `transformers-0.6` and `mtl-2.3.1`
24 - Drop support for GHC 7.6 and 7.8
25
26 - r1 (18 Dec 2022): require `base >= 4.8`
27 - r2 (9 Jan 2023): require `random >= 1.0.1`
28 - r3 (22 Feb 2023): allow `primitive-0.8`
29 - r4 (12 Oct 2023): allow `primitive-0.9`, test on GHC 9.6 and 9.8
30
31 0.5.3 (8 April 2021)
32 --------------------
33
34 - `StatefulGen` instances for `RandT`
35 - Addition of `RandGen`
36 - Addition of `withRandGen` and `withRandGen_`
37
38 - r1 (28 April 2021): require `base >= 4.6`
39 - r2 (9 Aug 2021): allow `transformers-compat-0.7`.
40 - r3 (9 Aug 2022): Test with GHC 9.0-9.4
41
42 0.5.2 (24 June 2020)
43 --------------------
44
45 - Support for `random-1.2`.
46 - Drop support for GHC 7.4, test with GHC 8.10.
47
48 0.5.1.2 (18 Jan 2020)
49 ---------------------
50
51 - Better error message when total probability sum is negative in
52 fromListMay, weightedMay, weighted
53
54 0.5.1.1 (21 May 2018)
55 ---------------------
56
57 - Only depend on `fail` package when GHC < 8.0.
58
59 0.5.1 (9 February 2017)
60 -----------------------
61
62 Re-export `System.Random` from `Control.Monad.Random.{Lazy,Strict}`
63 and hence also from `Control.Monad.Random`.
64
65 - Hackage r1: allow `transformers-compat-0.6.x`.
66
67 0.5 (3 January 2017)
68 --------------------
69
70 This release has quite a few small additions as well as a big module
71 reorganization. However, thanks to module re-exports, most existing
72 code using the library should continue to work with no changes; the
73 major version bump reflects the large reorganization and my
74 inability to 100% guarantee that existing user code will not break.
75
76 The biggest changes that may be of interest to users of the library
77 include new lazy vs strict variants of the `Rand` monad; a new
78 `MonadInterleave` class which is a big improvement over
79 `MonadSplit`; new `PrimMonad` instances; and new random selection
80 functions like `weighted`, `weightedMay`, `uniformMay`, *etc.*. See
81 the list below for full details.
82
83 Although there was some discussion of generalizing `MonadRandom` to
84 work for a wider range of underlying generators
85 (see
86 [#26](https://github.com/byorgey/MonadRandom/issues/26),
87 [#31](https://github.com/byorgey/MonadRandom/issues/31), and
88 [comments on this blog post](https://byorgey.wordpress.com/2016/11/16/monadrandom-0-5-and-mwc-random-feedback-wanted/)),
89 I decided to punt on that for now. It seems rather complicated and
90 there
91 are
92 [already good alternatives](http://hackage.haskell.org/package/random%2Dfu) so
93 I decided to keep things simple for this release. I'm still open to
94 proposals for generalizing future releases.
95
96 Changes in 0.5 include:
97
98 - Refactor to reflect structure of `mtl` and `transformers` libraries.
99 - Add lazy and strict variants of `RandT`.
100 - Add `MonadRandom` and `MonadSplit` instances for `ListT`.
101 - Add (but do not export) `unRandT` field to `RandT`.
102 - Add `MonadCont`, `MonadError`, `MonadRWS`, `PrimMonad`, and `MonadFail`
103 instances for `RandT`.
104 - Add `evalRandTIO` operation.
105 - Move `fromList` and `uniform` operations to
106 `Control.Monad.Random.Class`.
107 - `fromList` now raises an error when the total weight of elements
108 is zero.
109 - Generalize the type of `uniform` to work over any `Foldable`.
110 - Add new operations `weighted`, `weightedMay`, `fromListMay`, and
111 `uniformMay`. `weighted` is like `fromList` but generalized to
112 work over any `Foldable`. The `May` variants return a `Maybe`
113 result instead of raising an error.
114 - New `MonadInterleave` class for random monads which can interleave
115 random generation using `split`. In some ways this is similar to
116 `MonadSplit` but much more useful.
117 - Improved documentation.
118
119 0.4.2.3 (21 April 2016)
120 -----------------------
121
122 - Mark `Control.Monad.Random` as `Trustworthy`.
123
124 0.4.2.2 (18 January 2016)
125 -------------------------
126
127 - Allow `transformers-0.5`.
128
129 0.4.2.1 (16 January 2016)
130 -------------------------
131
132 - Allow `transformers-compat-0.5`.
133
134 0.4.2 (16 January 2016)
135 -----------------------
136
137 - Add `MonadPlus` and `Alternative` instances for `RandT`.
138
139 0.4.1 (20 November 2015)
140 ------------------------
141
142 - Remove unnecessary `Monad m` constraint from `liftRandT` and
143 `runRandT`.
144
145 This should again technically require a major version bump, but I'm
146 not doing it this time in the interest of not being super annoying.
147 If this breaks something for you, just yell, and I will
148 deprecate this version and do a proper 0.5 release.
149
150 0.4 (12 May 2015)
151 -----------------
152
153 - Remove unnecessary `RandomGen g` constraints from `liftRandT`,
154 `liftRand`, `evalRandT`, `evalRand`, `runRandT`, `runRand`.
155
156 A major version bump is required by the PVP since the types of all
157 the above methods have changed, but this release is again very
158 unlikely to break any client code.
159
160 0.3.0.2 (30 March 2015)
161 -----------------------
162
163 - Add `transformers-compat` to allow building with newer `mtl`
164
165 0.3.0.1 (24 November 2014)
166 --------------------------
167
168 - Improve documentation: ranges are exclusive at the upper bound
169
170 0.3 (4 September 2014)
171 ----------------------
172
173 - Eta-reduce definition of `Rand`
174 - Remove unnecessary `Random a` constraint from types of `liftRand`
175 and `liftRandT`.
176
177 Note that a major version bump is required by the PVP since the
178 types of `liftRand` and `liftRandT` have changed, but this release
179 is highly unlikely to break any client code.
180
181 0.2.0.1 (24 August 2014)
182 ------------------------
183
184 - Allow building with both `transformers-0.3` and `0.4`.
185
186 0.2 (20 August 2014)
187 --------------------
188
189 - change `Rand` from a `newtype` to a type synonym
190 - `MonadRandom` and `MonadSplit` instances for
191 - `ExceptT`
192 - strict variants of `StateT` and `WriterT`
193 - both lazy and strict variants of `RWST`
194 - remove unneeded `RandomGen` constraint from `MonadState RandT` instance
195
196 0.1.13 (9 February 2014)
197 ------------------------
198
199 - add simple `uniform` function for creating a uniform distribution
200 over a list of values
201
202 0.1.12 (30 September 2013)
203 --------------------------
204
205 - add `liftRandT` and `liftRand` functions, for lifting explicit
206 generator-passing functions into `RandT` and `Rand`, respectively.
207
208 0.1.11 (1 August 2013)
209 ----------------------
210
211 - add `MonadRandom` and `MonadSplit` instances for `IdentityT`
212 - derive `MonadReader` and `MonadWriter` instances instead of declaring
213 them explicitly (thanks again to James Koppel)
214
215 0.1.10 (16 July 2013)
216 ---------------------
217
218 - add `MonadRandom` and `MonadSplit` instances for `ContT`
219 (thanks to James Koppel for the patch)
220
221 0.1.9 (26 April 2013)
222 ---------------------
223
224 - add `MonadRandom` and `MonadSplit` instances for `MaybeT`