[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 2 commits: user_guide: Note -pgmP/-optP are for /Haskell/-CPP

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Fri Jan 10 15:22:00 UTC 2025



Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC


Commits:
efb786dd by Rodrigo Mesquita at 2025-01-10T10:17:39-05:00
user_guide: Note -pgmP/-optP are for /Haskell/-CPP

Fixes #25574

- - - - -
1c80092a by Ben Gamari at 2025-01-10T10:17:39-05:00
dump-decls: Suppress unit-ids

While the testsuite driver already normalizes these away, they are
nevertheless a severe nuisance when diffing outside of the testsuite.

Intriguingly, this doesn't completely eliminate the unit IDs; some
wired-in names are still printed. However, this is a cheap and helpful
improvement over the status quo so I am simply going to accept this.

Fixes #25334.

- - - - -


2 changed files:

- docs/users_guide/phases.rst
- utils/dump-decls/Main.hs


Changes:

=====================================
docs/users_guide/phases.rst
=====================================
@@ -25,11 +25,12 @@ given compilation phase:
     Use ⟨cmd⟩ as the literate pre-processor.
 
 .. ghc-flag:: -pgmP ⟨cmd⟩
-    :shortdesc: Use ⟨cmd⟩ as the C pre-processor (with :ghc-flag:`-cpp` only)
+    :shortdesc: Use ⟨cmd⟩ as the Haskell C pre-processor (with :ghc-flag:`-cpp` only)
     :type: dynamic
     :category: phase-programs
 
-    Use ⟨cmd⟩ as the C pre-processor (with :ghc-flag:`-cpp` only).
+    Use ⟨cmd⟩ as the Haskell C pre-processor (with :ghc-flag:`-cpp` only).
+    Note that the Haskell C pre-processor only pre-processes Haskell files.
 
 .. ghc-flag:: -pgmJSP ⟨cmd⟩
     :shortdesc: Use ⟨cmd⟩ as the JavaScript C pre-processor (only for javascript-backend)
@@ -177,7 +178,11 @@ the following flags:
     :type: dynamic
     :category: phase-options
 
-    Pass ⟨option⟩ to CPP (makes sense only if :ghc-flag:`-cpp` is also on).
+    Pass ⟨option⟩ to the Haskell CPP (makes sense only if :ghc-flag:`-cpp` is also on).
+    Note that the Haskell pre-processor options only apply to pre-processing
+    invocations on Haskell files, and, e.g., to use different options to
+    pre-process Javascript or Cmm, one should use ``-optJSP``, or
+    ``-optCmmP``, respectively).
 
 .. ghc-flag:: -optJSP ⟨option⟩
     :shortdesc: pass ⟨option⟩ to JavaScript C pre-processor (only for javascript-backend)


=====================================
utils/dump-decls/Main.hs
=====================================
@@ -38,6 +38,7 @@ run root pkg_nm = runGhc (Just root) $ do
             , "-dppr-cols=1000"
             , "-fprint-explicit-runtime-reps"
             , "-fprint-explicit-foralls"
+            , "-fsuppress-unit-ids"
             ]
     dflags <- do
         dflags <- getSessionDynFlags



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d67ed785230b22af25c05983cd61d51bf4920806...1c80092a23f01279cca64e5907787e10137904a4

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d67ed785230b22af25c05983cd61d51bf4920806...1c80092a23f01279cca64e5907787e10137904a4
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/20250110/1e5dfda1/attachment-0001.html>


More information about the ghc-commits mailing list