[Git][ghc/ghc][master] user_guide: Note -pgmP/-optP are for /Haskell/-CPP

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Fri Jan 10 19:58:18 UTC 2025



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
023f36f5 by Rodrigo Mesquita at 2025-01-10T14:57:48-05:00
user_guide: Note -pgmP/-optP are for /Haskell/-CPP

Fixes #25574

- - - - -


1 changed file:

- docs/users_guide/phases.rst


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)



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/023f36f516aa4bd9453903d5039cf8eec6010731
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/0cfc709d/attachment-0001.html>


More information about the ghc-commits mailing list