`-ddump-json` combined with `-ddump-to-file` does not save files
Summary
The documents suggest that -ddump-json
combined with -ddump-to-file
should result in files being created like prefix.dump-json
. Instead, JSON is dumped to stdout and no files are created. -ddump-simpl
, on the other hand, works as expected.
Steps to reproduce
[mwb-dev:~/mercury/other-backend]$ cat > Test.hs
main :: IO ()
main = mempty
^D
[mwb-dev:~/mercury/other-backend]$ ghc -ddump-json -ddump-to-file -ddump-file-prefix=FooBar Test.hs
{"span":null,"doc":"[2 of 2] Linking Test [Objects changed]","messageClass":"MCOutput"}
Expected behavior
I would expect a file FooBar.dump-json
to exist. But it does not.
Environment
- GHC version used:
9.4.4
Optional:
- Operating System: MacOS 12.6.3 (21G419)
- System Architecture: aarch64