Skip to content
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

Compatibility with random-fu 3.0 #4

Open
sternenseemann opened this issue Mar 2, 2022 · 0 comments · May be fixed by #5
Open

Compatibility with random-fu 3.0 #4

sternenseemann opened this issue Mar 2, 2022 · 0 comments · May be fixed by #5

Comments

@sternenseemann
Copy link

Build log with the latest version of random-fu:

Building library for random-extras-0.19..
[1 of 5] Compiling Data.Random.Distribution.Uniform.Exclusive ( Data/Random/Distribution/Uniform/Exclusive.hs, dist/build/Data/Random/Distribution/Uniform/Exclusive.o, dist/build/Data/Random/Distribution/Uniform/Exclusive.dyn_o )
[2 of 5] Compiling Data.Random.Dovetail ( Data/Random/Dovetail.hs, dist/build/Data/Random/Dovetail.o, dist/build/Data/Random/Dovetail.dyn_o )

Data/Random/Dovetail.hs:42:1: warning: [-Wunused-imports]
    The import of ‘Control.Applicative’ is redundant
      except perhaps to import instances from ‘Control.Applicative’
    To import instances alone, use: import Control.Applicative()
   |
42 | import Control.Applicative ((<$>))
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[3 of 5] Compiling Data.Random.Extras ( Data/Random/Extras.hs, dist/build/Data/Random/Extras.o, dist/build/Data/Random/Extras.dyn_o )
[4 of 5] Compiling Data.Random.Show.Unsafe ( Data/Random/Show/Unsafe.hs, dist/build/Data/Random/Show/Unsafe.o, dist/build/Data/Random/Show/Unsafe.dyn_o )

Data/Random/Show/Unsafe.hs:24:40: error:
    • Could not deduce (random-1.2.1:System.Random.Internal.StatefulGen
                          DevRandom IO)
        arising from a use of ‘runRVar’
      from the context: Show a
        bound by the instance declaration
        at Data/Random/Show/Unsafe.hs:23:10-34
    • In the second argument of ‘($)’, namely ‘runRVar rv DevURandom’
      In the expression: show . unsafePerformIO $ runRVar rv DevURandom
      In an equation for ‘show’:
          show rv = show . unsafePerformIO $ runRVar rv DevURandom
   |
24 |     show rv = show . unsafePerformIO $ runRVar rv DevURandom
   |                                        ^^^^^^^^^^^^^^^^^^^^^
[5 of 5] Compiling Data.Random.Shuffle.Weighted ( Data/Random/Shuffle/Weighted.hs, dist/build/Data/Random/Shuffle/Weighted.o, dist/build/Data/Random/Shuffle/Weighted.dyn_o )

Data/Random/Shuffle/Weighted.hs:49:1: warning: [-Wunused-imports]
    The import of ‘Control.Applicative’ is redundant
      except perhaps to import instances from ‘Control.Applicative’
    To import instances alone, use: import Control.Applicative()
   |
49 | import Control.Applicative ((<$>))
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sternenseemann added a commit to sternenseemann/random-extras that referenced this issue Apr 11, 2022
0.3 replaced random-source with the normal random package, so we can now
use a more portable globalStdGen fro Data.Random.Show.Unsafe.

We lose the dependency on random-source and incur one on random. The
lower bound on random-fu is increased.

Closes aristidb#4.
@sternenseemann sternenseemann linked a pull request Apr 11, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant