foundation icon indicating copy to clipboard operation
foundation copied to clipboard

Build failure in basement-0.0.14 with GHC-9.4.1

Open sjakobi opened this issue 3 years ago • 1 comments

Basement/Numerical/Conversion.hs:33:26: error:
    • Couldn't match expected type ‘Int64#’ with actual type ‘Int#’
    • In the first argument of ‘I64#’, namely ‘i’
      In the expression: I64# i
      In an equation for ‘intToInt64’: intToInt64 (I# i) = I64# i
   |
33 | intToInt64 (I# i) = I64# i
   |                          ^

Basement/Numerical/Conversion.hs:40:26: error:
    • Couldn't match expected type ‘Int#’ with actual type ‘Int64#’
    • In the first argument of ‘I#’, namely ‘i’
      In the expression: I# i
      In an equation for ‘int64ToInt’: int64ToInt (I64# i) = I# i
   |
40 | int64ToInt (I64# i) = I# i
   |                          ^

Basement/Numerical/Conversion.hs:47:28: error:
    • Couldn't match expected type ‘Word64#’ with actual type ‘Word#’
    • In the first argument of ‘W64#’, namely ‘i’
      In the expression: W64# i
      In an equation for ‘wordToWord64’: wordToWord64 (W# i) = W64# i
   |
47 | wordToWord64 (W# i) = W64# i
   |                            ^

Basement/Numerical/Conversion.hs:54:28: error:
    • Couldn't match expected type ‘Word#’ with actual type ‘Word64#’
    • In the first argument of ‘W#’, namely ‘i’
      In the expression: W# i
      In an equation for ‘word64ToWord’: word64ToWord (W64# i) = W# i
   |
54 | word64ToWord (W64# i) = W# i
   |                            ^

Basement/Numerical/Conversion.hs:61:32: error:
    • Couldn't match expected type ‘Int64#’ with actual type ‘Int#’
    • In the first argument of ‘I64#’, namely ‘(word2Int# i)’
      In the expression: I64# (word2Int# i)
      In an equation for ‘word64ToInt64’:
          word64ToInt64 (W64# i) = I64# (word2Int# i)
   |
61 | word64ToInt64 (W64# i) = I64# (word2Int# i)
   |                                ^^^^^^^^^^^

Basement/Numerical/Conversion.hs:61:42: error:
    • Couldn't match expected type ‘Word#’ with actual type ‘Word64#’
    • In the first argument of ‘word2Int#’, namely ‘i’
      In the first argument of ‘I64#’, namely ‘(word2Int# i)’
      In the expression: I64# (word2Int# i)
   |
61 | word64ToInt64 (W64# i) = I64# (word2Int# i)
   |                                          ^

Basement/Numerical/Conversion.hs:68:32: error:
    • Couldn't match expected type ‘Word64#’ with actual type ‘Word#’
    • In the first argument of ‘W64#’, namely ‘(int2Word# i)’
      In the expression: W64# (int2Word# i)
      In an equation for ‘int64ToWord64’:
          int64ToWord64 (I64# i) = W64# (int2Word# i)
   |
68 | int64ToWord64 (I64# i) = W64# (int2Word# i)
   |                                ^^^^^^^^^^^

Basement/Numerical/Conversion.hs:68:42: error:
    • Couldn't match expected type ‘Int#’ with actual type ‘Int64#’
    • In the first argument of ‘int2Word#’, namely ‘i’
      In the first argument of ‘W64#’, namely ‘(int2Word# i)’
      In the expression: W64# (int2Word# i)
   |
68 | int64ToWord64 (I64# i) = W64# (int2Word# i)
   |                                          ^

Basement/Numerical/Conversion.hs:85:79: error:
    • Couldn't match expected type ‘Word#’ with actual type ‘Word64#’
    • In the first argument of ‘uncheckedShiftRL#’, namely ‘w64’
      In the first argument of ‘wordToWord32#’, namely
        ‘(uncheckedShiftRL# w64 32#)’
      In the first argument of ‘W32#’, namely
        ‘(wordToWord32# (uncheckedShiftRL# w64 32#))’
   |
85 | word64ToWord32s (W64# w64) = Word32x2 (W32# (wordToWord32# (uncheckedShiftRL# w64 32#))) (W32# (wordToWord32# w64))
   |                                                                               ^^^

Basement/Numerical/Conversion.hs:85:111: error:
    • Couldn't match expected type ‘Word#’ with actual type ‘Word64#’
    • In the first argument of ‘wordToWord32#’, namely ‘w64’
      In the first argument of ‘W32#’, namely ‘(wordToWord32# w64)’
      In the second argument of ‘Word32x2’, namely
        ‘(W32# (wordToWord32# w64))’
   |
85 | word64ToWord32s (W64# w64) = Word32x2 (W32# (wordToWord32# (uncheckedShiftRL# w64 32#))) (W32# (wordToWord32# w64))
   |                                                                                                               ^^^

https://github.com/haskell-foundation/foundation/pull/564 intends to fix this, but it would also be good to revise the existing release on Hackage with a bound base < 4.17.

sjakobi avatar Aug 09 '22 16:08 sjakobi

I made the respective revisions, e.g.: https://hackage.haskell.org/package/basement-0.0.14/revisions/

andreasabel avatar Aug 14 '22 14:08 andreasabel

basement-0.0.15 is compatible with GHC-9.4. Cheers! :)

sjakobi avatar Sep 12 '22 02:09 sjakobi