haskell / text-icu

This package provides the Haskell Data.Text.ICU library, for performing complex manipulation of Unicode text.
BSD 2-Clause "Simplified" License
47 stars 41 forks source link

GHC 9.4 build error: Couldn't match type ‘GHC.Word.Word8’ with ‘Word16 #77

Closed maerten closed 2 years ago

maerten commented 2 years ago
text-icu                     >
text-icu                     > /private/var/folders/0c/zmpjp7l568xcvnt49pkkn5p00000gn/T/stack-7d50abf0944b2f36/text-icu-0.7.1.0/Data/Text/ICU/Internal.hsc:58:23: error:
text-icu                     > [14 of 25] Compiling Data.Text.ICU.Normalize.Internal
text-icu                     >     • Couldn't match type ‘GHC.Word.Word8’ with ‘Word16’
text-icu                     >       Expected: Ptr UChar
text-icu                     >         Actual: Ptr GHC.Word.Word8
text-icu                     >     • In the second argument of ‘uiter_setString’, namely ‘p’
text-icu                     >       In the first argument of ‘(>>)’, namely
text-icu                     >         ‘uiter_setString i p (fromIntegral l)’
text-icu                     >       In the expression: uiter_setString i p (fromIntegral l) >> act i
text-icu                     >    |
text-icu                     > 58 |     uiter_setString i p (fromIntegral l) >> act i
text-icu                     >    |                       ^
text-icu                     > [20 of 25] Compiling Data.Text.ICU.Spoof.Internal
andreasabel commented 2 years ago

text-icu-0.7.1.0 has text < 2 but GHC 9.4 comes with text-2.0.1. Thus, building text-icu-0.7.1.0 with GHC 9.4 should fail already at the constraint solving phase (and does so with cabal). That it is anyway attempted in your case is likely caused by stack ignoring bounds.

This is a non-issue, I suggest to close it. Not sure how you got there; if at all, this is an issue with stack.

maerten commented 2 years ago

Oh yes, my bad! Thanks