ekmett / bytes

Serialization primitives that work with both cereal and binary.
http://hackage.haskell.org/package/bytes
Other
22 stars 13 forks source link

bytes-0.15.3 failed during the configure step (GHC 8) #41

Closed mcandre closed 6 years ago

mcandre commented 6 years ago

Hi, I'm trying to install random-fu-0.2.7.0 with ghc v8.2.1 and cabal 1.22.5.0, in order to access random numbers with modern Haskell Platform. However, when I try to install random-fu, cabal responds with an error about the bytes package:

$ shake
...
Command: cabal install --bindir dist/bin
Exit code: 1
Stderr:
cabal: Error: some packages failed to install:
bytes-0.15.3 failed during the configure step. The exception was:
user error ('/usr/local/bin/ghc' exited with an error:

/var/folders/53/300vy1ys7tv8h8fr_z3tm8gr0000gn/T/cabal-tmp-8690/bytes-0.15.3/dist/setup/setup.hs:168:18:
error:
• Couldn't match type ‘Distribution.Types.MungedPackageId.MungedPackageId’
with ‘Distribution.Types.PackageId.PackageIdentifier’
Expected type: [(UnitId, PackageId)]
Actual type: [(UnitId,
Distribution.Types.MungedPackageId.MungedPackageId)]
• In the expression:
nub $ componentPackageDeps xs ++ componentPackageDeps ys
In an equation for ‘testDeps’:
testDeps xs ys
= nub $ componentPackageDeps xs ++ componentPackageDeps ys
|
168 | testDeps xs ys = nub $ componentPackageDeps xs ++ componentPackageDeps
ys
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
genetics-0.0.3 depends on bytes-0.15.3 which failed to install.
log-domain-0.12 depends on bytes-0.15.3 which failed to install.
random-fu-0.2.7.0 depends on bytes-0.15.3 which failed to install.
)

Could the bytes package be updated to reflect changes in the GHC 7 and GHC 8 API?

As a workaround, I am using the random package instead.

https://hackage.haskell.org/package/random

RyanGlScott commented 6 years ago

Can you successfully build bytes from this GitHub repo?

RyanGlScott commented 6 years ago

You might also try running cabal update and trying again, as I've just uploaded bytes-0.15.4 to Hackage, which has a significantly simpler Setup.hs script (that should hopefully pose fewer issues for you).

RyanGlScott commented 6 years ago

I can reproduce the failure with bytes-0.15.3 but not bytes-0.15.4, so I'm going to close this. Please reopen if you still experience issues.