Unicode strings are mangled in GHC 9.0.1
Summary
GHC 9.0.1 seems to behave weirdly, when strings contain Unicode characters, while GHC 8.10.5 and HEAD work fine.
@mpickering Is it another manifestation of #19976 (closed)?
Steps to reproduce
{-# OPTIONS_GHC -O1 #-}
import Data.Text ()
import Data.Text.Internal.Fusion (unstream)
import Data.Text.Internal.Fusion.Common (streamList)
main :: IO ()
main = print (unstream (streamList "\65536"))
$ ghc-9.0.1 Unicode.hs && ./Unicode
[1 of 1] Compiling Main ( Unicode.hs, Unicode.o )
Linking Unicode ...
"\65536\62464\61312"
Expected behavior
I'd expect to have "\65536"
back.
Environment
- GHC version used: 9.0.1