summaryrefslogtreecommitdiff
path: root/compiler/GHC/Driver/Pipeline/Monad.hs
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-08-15 14:28:58 +0100
committerMatthew Pickering <matthewtpickering@gmail.com>2022-08-15 14:36:59 +0100
commitaeb209a24dbf31e43331577cfff4c541087a42c1 (patch)
treeef6d7ef352145e331cebb630b1195ac5f50125c5 /compiler/GHC/Driver/Pipeline/Monad.hs
parentdca43a04fb36e0ae0ed61455f215660eed2856a9 (diff)
downloadhaskell-wip/T22044.tar.gz
driver: Honour -x optionwip/T22044
The -x option is used to manually specify which phase a file should be started to be compiled from (even if it lacks the correct extension). I just failed to implement this when refactoring the driver. In particular Cabal calls GHC with `-E -cpp -x hs Foo.cpphs` to preprocess source files using GHC. I added a test to exercise this case. Fixes #22044
Diffstat (limited to 'compiler/GHC/Driver/Pipeline/Monad.hs')
-rw-r--r--compiler/GHC/Driver/Pipeline/Monad.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/GHC/Driver/Pipeline/Monad.hs b/compiler/GHC/Driver/Pipeline/Monad.hs
index 5415ecf2fe..f95c953e80 100644
--- a/compiler/GHC/Driver/Pipeline/Monad.hs
+++ b/compiler/GHC/Driver/Pipeline/Monad.hs
@@ -29,6 +29,7 @@ data PipeEnv = PipeEnv {
src_filename :: String, -- ^ basename of original input source
src_basename :: String, -- ^ basename of original input source
src_suffix :: String, -- ^ its extension
+ start_phase :: Phase,
output_spec :: PipelineOutput -- ^ says where to put the pipeline output
}