diff options
author | Bodigrim <andrew.lelechenko@gmail.com> | 2022-09-14 22:02:18 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-09-28 22:52:38 -0400 |
commit | 6a2eec98d9f5c3f5d735042f0d7bb65d0dbb3323 (patch) | |
tree | 4dc1798d823d8383607284d9a7e49454616ccb3f /compiler/GHC/Data/FastString.hs | |
parent | bc0020fa0871aff23d26b0116c1d4e43b8a3e9a9 (diff) | |
download | haskell-6a2eec98d9f5c3f5d735042f0d7bb65d0dbb3323.tar.gz |
Eliminate headFS, use unconsFS instead
A small step towards #22185 to avoid partial functions + safe implementation
of `startsWithUnderscore`.
Diffstat (limited to 'compiler/GHC/Data/FastString.hs')
-rw-r--r-- | compiler/GHC/Data/FastString.hs | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/compiler/GHC/Data/FastString.hs b/compiler/GHC/Data/FastString.hs index 98ca34c249..483d40cca1 100644 --- a/compiler/GHC/Data/FastString.hs +++ b/compiler/GHC/Data/FastString.hs @@ -82,7 +82,6 @@ module GHC.Data.FastString lengthFS, nullFS, appendFS, - headFS, concatFS, consFS, nilFS, @@ -609,11 +608,6 @@ appendFS fs1 fs2 = mkFastStringShortByteString concatFS :: [FastString] -> FastString concatFS = mkFastStringShortByteString . mconcat . map fs_sbs -headFS :: FastString -> Char -headFS fs - | SBS.null $ fs_sbs fs = panic "headFS: Empty FastString" -headFS fs = head $ unpackFS fs - consFS :: Char -> FastString -> FastString consFS c fs = mkFastString (c : unpackFS fs) |