-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't use unsafePerformIO
, and migrate to random-1.2.
#10
Comments
More details: commercialhaskell/stackage#5474 |
Should be fixed with: jimenezrick@3e0f1f9 |
Thanks @jimenezrick. Fixed this in 68e29c3 |
@igrep is there some documentation or a blog post where I can read more about this? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think the
ULID
type shouldn't be an instance ofRandom
(orUniform
since random-1.2) by taking the trouble to useunsafePerfomIO
.The
random
function should be pure: if the argumentg
is the same value, the result ofrandom g
should be same. Breaking this rule can cause some troubles. For example, we can't reproduce the same value with the same generator (perhaps deserialized from a database). I haven't actually got troubled with such a case, but I think it'll cause some hard-to-find bug some day.My suggestion is to drop the support for
Random
instance ofULID
, and define the instanceRandom ULIDRandom
instead. That makes the package safely available.Speaking of the random package, due to the changes in random-1.2, now this package can't be built with the latest random. So how about fixing the problem and supporting random-1.2 at the same time?
The text was updated successfully, but these errors were encountered: