-
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
Use RandomGen in sampleState and sampleStateT #45
Use RandomGen in sampleState and sampleStateT #45
Conversation
Ah it seems I've done something wrong here. It's not actually building properly because it's not picking up my local changes in |
Can you explain why this is better than e.g.
which compiles but what should the |
Thanks for taking a look at this and the related issue. Sorry for coming in guns blazing but I wanted to test this in some related work code :) It took me a bit to understand the inner workings, I'll blame it on trying to code too late on a Friday evening 😬 So my thinking around this is that What do you think? Otherwise I can take a crack at adding |
I just tried building your PR.
More worryingly I get an error when building
|
Here's a bit more information
|
Ok I think I am with you now. Rather than e.g. writing
with
you define such an instance for anything in But what should we do about overlapping instances? We could just
But your change seems to be a breaking change since folks could have Would it be possible to create a CHANGELOG.md with a note indicating I note that we have no CI nor any great tests but that's nothing to do |
Another two things (sorry): will this affect performance? Possibly for the duplicate instance of MT only. What about the "cannot specialise" warnings? |
I have now set up CI (https://circleci.com/gh/haskell-numerics/random-fu) and in doing so decided to put the main repo here: https://github.com/haskell-numerics. I'd like to make a new release with your PR in it if that's possible. |
Hey @idontgetoutmuch sorry been doing some travelling, but going to take a look at this now.
|
@FintanH I had to revert this as it causes ghc to panic: https://gitlab.haskell.org/ghc/ghc/issues/18118 |
oof, it's been a while since I wrote this. If you need help with it again let me know :) I can't even remember what I wanted it for now 😅 |
No worries - I wanted to let you know your efforts were not in vain - I am trying to fix the problem which is almost certainly something to do with ghc or nix. |
Thanks, I appreciate it :) |
@FintanH FYI - it caused a performance regression so sadly I have reverted it - thanks for contributing. |
Fixes #44
RandomGen
inData.Random.Source
RandomGen
as a type class constraint insampleState
andsampleStateT