[xmonad] question about code in XMonad.Actions.GridSelect

Platon Pronko platon7pronko at gmail.com
Thu Jul 15 07:31:00 UTC 2021


Hi!

I'm working on a PR right now. I've implemented the fix already, but I have trouble with tests -
  `stack test` uses random-1.1, and uniformR is not found there.

Should I use randomR instead? Alternatively, how can I specify that a newer version of random should be used?

Best regards,
Platon Pronko


On 2021-07-15 10:21, Solid wrote:
> Hi,
> 
> On Thu, Jul 15 2021 08:44, Platon Pronko wrote:
>> Looks like it is supposed to simply generate a Double number between 0
>> and 1 - why such complicated approach was used instead of `uniformR`
>> from System.Random?
> 
> this was implemented all the way back in ~2008 it seems; barely anyone
> from that era is still around, so I doubt you'll get a satisfying answer
> to _why_ :)
> 
> The `uniformR` function didn't exist back then, but `randomR` certainly
> did; I don't quite know why it was implemented in this convoluted way.
> I would definitely welcome a pr that fixes this, if you're so inclined.
> 


More information about the xmonad mailing list