[Git][ghc/ghc][wip/fs-modified-utf8] FastString is a __Modified__ UTF-8

Oleg Grenrus (@phadej) gitlab at gitlab.haskell.org
Thu Apr 11 21:19:33 UTC 2024



Oleg Grenrus pushed to branch wip/fs-modified-utf8 at Glasgow Haskell Compiler / GHC


Commits:
d7c5f733 by Oleg Grenrus at 2024-04-12T00:19:25+03:00
FastString is a __Modified__ UTF-8

- - - - -


3 changed files:

- compiler/GHC/Data/FastString.hs
- libraries/ghc-boot/GHC/Data/ShortText.hs
- libraries/ghc-boot/GHC/Utils/Encoding/UTF8.hs


Changes:

=====================================
compiler/GHC/Data/FastString.hs
=====================================
@@ -198,8 +198,8 @@ mkFastZStringString str = FastZString (BSC.pack str)
 
 -- -----------------------------------------------------------------------------
 
-{-| A 'FastString' is a UTF-8 encoded string together with a unique ID. All
-'FastString's are stored in a global hashtable to support fast O(1)
+{-| A 'FastString' is a Modified UTF-8 encoded string together with a unique ID.
+All 'FastString's are stored in a global hashtable to support fast O(1)
 comparison.
 
 It is also associated with a lazy reference to the Z-encoding


=====================================
libraries/ghc-boot/GHC/Data/ShortText.hs
=====================================
@@ -24,6 +24,10 @@
 
 -- Very similar to FastString, but not hash-consed and with some extra instances and
 -- functions for serialisation and I/O. Should be imported qualified.
+--
+-- /Note:/ This string is stored in Modified UTF8 format,
+-- thus it's not byte-compatible with @ShortText@ type in @text-short@
+-- package.
 
 module GHC.Data.ShortText (
         -- * ShortText


=====================================
libraries/ghc-boot/GHC/Utils/Encoding/UTF8.hs
=====================================
@@ -7,7 +7,7 @@
 -- of the package database (needed in both ghc and in ghc-pkg) lives in
 -- `ghc-boot` and uses ShortText, which in turn depends on this module.
 
--- | Simple, non-streaming UTF-8 codecs.
+-- | Simple, non-streaming Modified UTF-8 codecs.
 --
 -- This is one of several UTF-8 implementations provided by GHC; see Note
 -- [GHC's many UTF-8 implementations] in "GHC.Encoding.UTF8" for an



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d7c5f7338e90cbbf02fa2659309e8db4bb57a7f9

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d7c5f7338e90cbbf02fa2659309e8db4bb57a7f9
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240411/f4db9078/attachment-0001.html>


More information about the ghc-commits mailing list