[xmonad] question about code in XMonad.Actions.GridSelect
Platon Pronko
platon7pronko at gmail.com
Thu Jul 15 11:17:55 UTC 2021
It looks like actually "properly" upgrading to the newer package version
is going to be harder than adding a package version to cabal file.
Stack uses "resolvers" configured to fetch packages from a specific
Haskell LTS, currently it's 17.14 and it includes older version of
`random` package.
Best regards,
Platon Pronko
On 2021-07-15 13:27, Platon Pronko wrote:
> Ah, yes, stack recommended to add it to extra deps. But I got scared
> of the long "sha256:30d72d..." string, wanted to keep it much simpler
> since I'm new here.
>
> I think if we want to update random then it would make sense to do it in
> separate PR - I can do it if you'd like.
>
> Best regards,
> Platon Pronko
>
> On 2021-07-15 13:20, Solid wrote:
>> On Thu, Jul 15 2021 11:34, Platon Pronko wrote:
>>> I've decided to just go with randomR, simpler and guaranteed to
>>> work. Here's the PR:
>>
>> You're probably right; though the whole Random class is (soft)
>> deprecated. Quoting from the docs[1]
>>
>>> Random exists primarily for backwards compatibility with version 1.1
>>> of this library. In new code, use the better specified Uniform and
>>> UniformRange instead.
>>
>>> P.S. I don't see an attachment in your email. But if there was simply an addition of
>>> "random >= 1.2" to build-depends (library and tests), then I've already tried and
>>> stack gave me lots of new errors (apparently the ghc snapshot it downloaded
>>> already includes random-1.1?).
>>
>> Ah, silly me; sorry. Should be attached now. If it's not on stackage
>> yet, you also have to add the version to the extra-deps.
>>
>> [1]: https://hackage.haskell.org/package/random-1.2.0/docs/System-Random.html#v:randomR
>>
More information about the xmonad
mailing list