Compilation failure while using GHC 9.2.1-rc1
Attempt to compile basement with ghc 9.2.1-rc1 on ubuntu 20.04.x on amd64 reveals following issue:
[19 of 84] Compiling Basement.Numerical.Conversion ( Basement/Numerical/Conversion.hs, /export/home/karel/vcs/haskell-libraries/foundation/basement/dist-newstyle/build/x86_64-linux/ghc-9.2.0.20210821/basement-0.0.12/build/Basement/Numerical/Conversion.o, /export/home/karel/vcs/haskell-libraries/foundation/basement/dist-newstyle/build/x86_64-linux/ghc-9.2.0.20210821/basement-0.0.12/build/Basement/Numerical/Conversion.dyn_o )
Basement/Numerical/Conversion.hs:84:46: error:
• Couldn't match expected type ‘Word32#’ with actual type ‘Word#’
• In the first argument of ‘W32#’, namely
‘(uncheckedShiftRL# w64 32#)’
In the first argument of ‘Word32x2’, namely
‘(W32# (uncheckedShiftRL# w64 32#))’
In the expression:
Word32x2
(W32# (uncheckedShiftRL# w64 32#)) (W32# (narrow32Word# w64))
|
84 | word64ToWord32s (W64# w64) = Word32x2 (W32# (uncheckedShiftRL# w64 32#)) (W32# (narrow32Word# w64))
| ^^^^^^^^^^^^^^^^^^^^^^^^^
Basement/Numerical/Conversion.hs:84:81: error:
• Couldn't match expected type ‘Word32#’ with actual type ‘Word#’
• In the first argument of ‘W32#’, namely ‘(narrow32Word# w64)’
In the second argument of ‘Word32x2’, namely
‘(W32# (narrow32Word# w64))’
In the expression:
Word32x2
(W32# (uncheckedShiftRL# w64 32#)) (W32# (narrow32Word# w64))
|
84 | word64ToWord32s (W64# w64) = Word32x2 (W32# (uncheckedShiftRL# w64 32#)) (W32# (narrow32Word# w64))
| ^^^^^^^^^^^^^^^^^
This head.hackage patch probably fixes the issue, but I haven't checked.
I can confirm that it builds fine on 9.2.1 with that patch.
I took this patch and made draft PR 555. Hopefully the maintainer will chime in with what form they'd find appealing. I'm sure the HackageHead module isn't it.
Looks like Gauge depends on basement, which causes most of benchmark suites fail to compile with GHC 9.2.1; would be great basement got a GHC 9.2.1 release.
Looks like Gauge depends on basement, which causes most of benchmark suites fail to compile with GHC 9.2.1
gauge users can also consider switching to tasty-bench which is currently maintained more actively.
This
head.hackagepatch probably fixes the issue, but I haven't checked.
How do I make use of this patch? I can't just cabal build can I?
Edit: Here it is
basement is used for several packages, e.g. snap which do not compile with 9.2.1. I see the exact same errors as mentioned initially - 4 month later.
Could you please put a patched version to hackage? Thank you!
this issue seems to be fixed in 0.0.13