-
Notifications
You must be signed in to change notification settings - Fork 21
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
Refactor to reflect structure of mtl
and transformers
libraries
#25
Conversation
For more information, see the file CHANGES.markdown Closes byorgey#23
Stability : experimental | ||
Portability : non-portable (multi-param classes, functional dependencies, undecidable instances) | ||
|
||
Lazy random monads, passing a random number generator through a computation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this say 'strict'?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it should.
I've submitted a patch (see: 8648613acb6a90d29c154387e7faf3605447e68a).
Thanks for this! I'm still trying to wrap my head around all the changes. A few questions:
|
No problem at all! Happy to contribute. Especially to a library that I use in pretty much all of my Haskell projects. Lazy and strict variants are included for two reasons:
I removed the
evalRandIO :: Rand StdGen a -> IO a
evalRandIO x = fmap (evalRand x) newStdGen
evalRandTIO :: (MonadIO m) => RandT StdGen m a -> m a
evalRandTIO x = liftIO newStdGen >>= evalRandT x |
Sure, but in some sense the same argument applies to this entire library, which is easily defined in terms of
Sure, but that is not an argument for removing
Again, this may be true but it does not seem like an argument for removing it.
This seems dubious to me. If we are really so worried about optimization we could add an In short, I don't think these are good reasons, and I am strongly against removing this function, which will probably break existing user code. I personally use |
It is a breaking change. That's for sure. GitHub search finds 449 uses of
This is a very good point. If |
Not at all. |
Right. In that case, even if we were to remove it (which I still see no reason to do) we would at the very least want to deprecate it first and remove it in a subsequence release. |
@@ -1,3 +1,9 @@ | |||
0.5.1 (3 Aug 2016) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should just be folded into the 0.5 changes below, I am not planning to make two separate 0.5 and 0.5.1 releases.
Sorry it's taken me so long to get around to this. There are a bunch of pending changes to the library, and I finally have the time to do a proper job of incorporating everything and making a new release. |
For more information, see the file CHANGES.markdown
Closes #23