haskell/text-icu

v0.7.{0.1,1.0} fails to build with GHC < 8.4

Closed this issue · 3 comments

v0.7.1.0 fails with ghc 8.0 and 8.2 without further constraints.

$ cabal install -w ghc-8.0.2 text-icu-0.7.1.0
...
[ 3 of 25] Compiling Data.Text.ICU.Internal ( dist/build/Data/Text/ICU/Internal.hs, dist/build/Data/Text/ICU/Internal.o )

Data/Text/ICU/Internal.hsc:58:23: error:
    • Couldn't match type ‘GHC.Word.Word8’ with ‘Word16’
      Expected type: Ptr UChar
        Actual type: Ptr GHC.Word.Word8
    • In the second argument of ‘uiter_setString’, namely ‘p’
      In the first argument of ‘(>>)’, namely
        ‘uiter_setString i p (fromIntegral l)’
      In the expression: uiter_setString i p (fromIntegral l) >> act i
Error: cabal: Failed to build text-icu-0.7.1.0.

Same for v0.7.0.1.

In the wild: https://github.com/agda/agda/runs/5494474576?check_suite_focus=true

Not sure which bound is lacking:

  • base >= 4.11 would rule out building with GHC 8.0 and 8.2, but it seems unlikely that these versions of text-icu were only intended for GHC >= 8.4. (Note that text-icu-0.7.0.0 is for GHC <= 7.8 only)
  • maybe bytestring needs to be constrained?
  • maybe bytestring needs to be constrained?

Yes, bytestring < 0.10 does the job.
I published the revisions:

I think the bound I introduced is too strict.
I have to investigate further.

The correct bound seems to be text < 2.
That bytestring < 0.10 helped was not causal, just coincidential.