Potential unintended `text` breaking change in 9.8.1-alpha1
I'm testing out 9.8.1-alpha1 and I've noticed that aeson
fails to build with the following message:
src/Data/Aeson/Internal/Text.hs:30:50: error: [GHC-88464]
Data constructor not in scope:
ByteArray :: GHC.Prim.ByteArray# -> Array
Suggested fix:
Add ‘ByteArray’ to the import list in the import of
‘Data.Text.Array’ (at src/Data/Aeson/Internal/Text.hs:11:1-55).
|
30 | let !(SBS.SBS arr) = SBS.toShort bs in T.Text (ByteArray arr) 0 len
|
This is caused by ghc/packages/text@2640dd62 (which is on text's master but not in any release yet afaict).
That commit changes Data.Text.Array.Array
to be a type synonym for Data.Array.Byte.ByteArray
and changes the constructor into a pattern synonym.
This means that code that has imports like import Data.Text.Array (Array(..))
or import Data.Text.Array (Array(ByteArray))
will break as we can't bundle pattern synonyms with type synonyms.
This is quite a minor/subtle breaking change and AFAICT it doesn't occur too much on hackage (instances). But it would probably be good to make a mindful choice about whether to include this or not in the current release.
If we do decide to include it I'd be happy to add an entry to the migration guide. I'm also going to submit a patch to aeson in any case (here).