[Git][ghc/ghc][wip/romes/ast-ohne-faststring] FIX
Rodrigo Mesquita (@alt-romes)
gitlab at gitlab.haskell.org
Fri Oct 11 17:13:42 UTC 2024
Rodrigo Mesquita pushed to branch wip/romes/ast-ohne-faststring at Glasgow Haskell Compiler / GHC
Commits:
7cab27c8 by Rodrigo Mesquita at 2024-10-11T18:13:31+01:00
FIX
- - - - -
5 changed files:
- compiler/GHC/Builtin/Utils.hs
- compiler/GHC/Parser/Header.hs
- compiler/GHC/Parser/Lexer.x
- compiler/Language/Haskell/Syntax/Lit.hs
- utils/haddock/haddock-api/haddock-api.cabal
Changes:
=====================================
compiler/GHC/Builtin/Utils.hs
=====================================
@@ -82,6 +82,7 @@ import GHC.Hs.Doc
import GHC.Unit.Module.ModIface (IfaceExport)
import GHC.Unit.Module.Warnings
+import GHC.Data.FastString (fastStringToText)
import GHC.Data.List.SetOps
import Control.Applicative ((<|>))
@@ -271,7 +272,7 @@ ghcPrimWarns = WarnSome
[]
where
mk_txt msg =
- DeprecatedTxt NoSourceText [noLocA $ WithHsDocIdentifiers (StringLiteral NoSourceText msg Nothing) []]
+ DeprecatedTxt NoSourceText [noLocA $ WithHsDocIdentifiers (StringLiteral NoSourceText (fastStringToText msg) Nothing) []]
mk_decl_dep (occ, msg) = (occ, mk_txt msg)
ghcPrimFixities :: [(OccName,Fixity)]
=====================================
compiler/GHC/Parser/Header.hs
=====================================
@@ -140,14 +140,7 @@ mkPrelImports this_mod loc implicit_prelude import_decls
-- explicit prelude imports
&& case ideclPkgQual decl of
NoRawPkgQual -> True
-<<<<<<< HEAD
RawPkgQual {} -> False
-||||||| parent of d9408cc56ae (the biggest boy)
- RawPkgQual b -> sl_fs b == unitIdFS baseUnitId
-=======
- RawPkgQual b -> sl_fs b == fastStringToText (unitIdFS baseUnitId)
->>>>>>> d9408cc56ae (the biggest boy)
-
loc' = noAnnSrcSpan loc
preludeImportDecl :: LImportDecl GhcPs
=====================================
compiler/GHC/Parser/Lexer.x
=====================================
@@ -923,14 +923,8 @@ data Token
-- Note [Literal source text] in "GHC.Types.SourceText"
| ITchar SourceText Char -- Note [Literal source text] in "GHC.Types.SourceText"
-<<<<<<< HEAD
- | ITstring SourceText Text -- Note [Literal source text] in "GHC.Types.SourceText"
- | ITstringMulti SourceText Text -- Note [Literal source text] in "GHC.Types.SourceText"
-||||||| parent of b7e90ce15e3 (more)
- | ITstring SourceText Text -- Note [Literal source text] in "GHC.Types.SourceText"
-=======
- | ITstring SourceText String -- Note [Literal source text] in "GHC.Types.SourceText"
->>>>>>> b7e90ce15e3 (more)
+ | ITstring SourceText String -- Note [Literal source text] in "GHC.Types.SourceText"
+ | ITstringMulti SourceText String -- Note [Literal source text] in "GHC.Types.SourceText"
| ITinteger IntegralLit -- Note [Literal source text] in "GHC.Types.SourceText"
| ITrational FractionalLit
@@ -2183,7 +2177,7 @@ tok_string span buf len _buf2 = do
addError err
pure $ L span (ITprimstring src (unsafeMkByteString s))
else
- pure $ L span (ITstring src (T.pack s))
+ pure $ L span (ITstring src s)
where
src = SourceText $ lexemeToFastString buf len
endsInHash = currentChar (offsetBytes (len - 1) buf) == '#'
@@ -2215,7 +2209,7 @@ tok_string_multi startSpan startBuf _len _buf2 = do
lexMultilineString contentLen contentStartBuf
setInput i'
- pure $ L span $ ITstringMulti src (T.pack s)
+ pure $ L span $ ITstringMulti src s
where
goContent i0 =
case alexScan i0 string_multi_content of
=====================================
compiler/Language/Haskell/Syntax/Lit.hs
=====================================
@@ -52,7 +52,7 @@ data HsLit x
-- ^ Unboxed character
| HsString (XHsString x) {- SourceText -} Text
-- ^ String
- | HsMultilineString (XHsMultilineString x) {- SourceText -} FastString
+ | HsMultilineString (XHsMultilineString x) {- SourceText -} Text
-- ^ String
| HsStringPrim (XHsStringPrim x) {- SourceText -} !ByteString
-- ^ Packed bytes
=====================================
utils/haddock/haddock-api/haddock-api.cabal
=====================================
@@ -83,6 +83,7 @@ library
, haddock-library ^>= 1.11
, xhtml ^>= 3000.2.2
, parsec ^>= 3.1.13.0
+ , text >= 2.0 && < 2.2
-- Versions for the dependencies below are transitively pinned by
-- the non-reinstallable `ghc` package and hence need no version
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7cab27c82ab81971a2c8f60675313cce7f1ef4b9
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7cab27c82ab81971a2c8f60675313cce7f1ef4b9
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/20241011/56b4d774/attachment-0001.html>
More information about the ghc-commits
mailing list