[Git][ghc/ghc][wip/aforemny/parameterize-source-text-lits-over-pass] Cleaned up leftover StringLiteral

Rodrigo Mesquita (@alt-romes) gitlab at gitlab.haskell.org
Mon Oct 21 15:57:13 UTC 2024



Rodrigo Mesquita pushed to branch wip/aforemny/parameterize-source-text-lits-over-pass at Glasgow Haskell Compiler / GHC


Commits:
927e20ae by Hassan Al-Awwadi at 2024-10-21T16:57:02+01:00
Cleaned up leftover StringLiteral

- - - - -


1 changed file:

- utils/check-exact/ExactPrint.hs


Changes:

=====================================
utils/check-exact/ExactPrint.hs
=====================================
@@ -1842,7 +1842,7 @@ instance ExactPrint (ImportDecl GhcPs) where
         _ -> return ann1
     ann3 <-
       case mpkg of
-       RawPkgQual (StringLiteral src' v _) ->
+       RawPkgQual (SL src' v _) ->
          printStringAtMLocL ann2 limportDeclAnnPackage (sourceTextToString src' (show v))
        _ -> return ann2
     modname' <- markAnnotated modname
@@ -2175,14 +2175,14 @@ exactNsSpec (DataNamespaceSpecifier data_) = do
 
 -- ---------------------------------------------------------------------
 
-instance ExactPrint StringLiteral where
+instance ExactPrint StringLit where
   getAnnotationEntry = const NoEntryVal
   setAnnotationAnchor a _ _ _ = a
 
-  exact (StringLiteral src fs mcomma) = do
+  exact (SL src fs mcomma) = do
     printSourceTextAA src (show (unpackFS fs))
     mcomma' <- mapM (\r -> printStringAtNC r ",") mcomma
-    return (StringLiteral src fs mcomma')
+    return (SL src fs mcomma')
 
 -- ---------------------------------------------------------------------
 
@@ -3079,7 +3079,7 @@ instance ExactPrint (HsExpr GhcPs) where
     let str = case ol_val ol of
                 HsIntegral   (IL src _ _) -> src
                 HsFractional (FL { fl_text = src }) -> src
-                HsIsString src _          -> src
+                HsIsString   (SL { sl_st = src }) -> src
     case str of
       SourceText s -> printStringAdvance (unpackFS s) >> return ()
       NoSourceText -> withPpr x >> return ()
@@ -4932,7 +4932,7 @@ instance ExactPrint (HsOverLit GhcPs) where
     let str = case ol_val ol of
                 HsIntegral   (IL src _ _) -> src
                 HsFractional (FL{ fl_text = src }) -> src
-                HsIsString src _ -> src
+                HsIsString   (SL{ sl_st = src }) -> src
     in
       case str of
         SourceText s -> printStringAdvance (unpackFS s) >> return ol



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/927e20aee0b0e2031110b633aad35963c2ecfd32
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/20241021/3ded2399/attachment-0001.html>


More information about the ghc-commits mailing list