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

Build failure with random-1.3.0 #54

Open
RyanGlScott opened this issue Jan 11, 2025 · 1 comment
Open

Build failure with random-1.3.0 #54

RyanGlScott opened this issue Jan 11, 2025 · 1 comment

Comments

@RyanGlScott
Copy link

If I attempt to build MonadRandom-0.6.1 against random-1.3.0, it fails to compile with the following error:

$ cabal build --allow-newer=MonadRandom:random
Downloading
https://hackage.haskell.org/package/random-1.3.0/random-1.3.0.tar.gz
Configuration is affected by the following files:
- cabal.project.local
Build profile: -w ghc-9.4.8 -O1
In order, the following will be built (use -v for more details):
 - MonadRandom-0.6.1 (lib) (first run)
Preprocessing library for MonadRandom-0.6.1...
Building library for MonadRandom-0.6.1...
[2 of 7] Compiling Control.Monad.Trans.Random.Strict ( Control/Monad/Trans/Random/Strict.hs, dist-newstyle/build/x86_64-linux/ghc-9.4.8/MonadRandom-0.6.1/build/Control/Monad/Trans/Random/Strict.o, dist-newstyle/build/x86_64-linux/ghc-9.4.8/MonadRandom-0.6.1/build/Control/Monad/Trans/Random/Strict.dyn_o )

Control/Monad/Trans/Random/Strict.hs:285:10: error:
    • Couldn't match type: MutableGen f0 (RandT g m)
                     with: RandGen g
        arising from a use of ‘System.Random.Internal.$dmuniformByteArrayM’
      The type variable ‘f0’ is ambiguous
    • In the expression:
        System.Random.Internal.$dmuniformByteArrayM
          @(RandGen g) @(RandT g m)
      In an equation for ‘uniformByteArrayM’:
          uniformByteArrayM
            = System.Random.Internal.$dmuniformByteArrayM
                @(RandGen g) @(RandT g m)
      In the instance declaration for
        ‘StatefulGen (RandGen g) (RandT g m)’
    • Relevant bindings include
        uniformByteArrayM :: Bool
                             -> Int -> RandGen g -> RandT g m Data.Array.Byte.ByteArray
          (bound at Control/Monad/Trans/Random/Strict.hs:285:10)
    |
285 | instance (Monad m, RandomGen g) => StatefulGen (RandGen g) (RandT g m) where
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: [Cabal-7125]
Failed to build MonadRandom-0.6.1.
@byorgey
Copy link
Owner

byorgey commented Jan 11, 2025

Yup, thanks for the report. I'm aware of this and working on a fix.

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

No branches or pull requests

2 participants