In the preprocessor mode GHC passes three filepaths in the following
form
-h fp infile outfile
The -h argument is intended to be used in the LINE pragma, and the input
should be read from the input file and written to the output file.
lhs2tex was reading the contents of fp and using that rather than the
infile argument which was only noticed when using lhs2tex as a
preprocessor with ghcide.
In the preprocessor mode GHC passes three filepaths in the following form
-h fp infile outfile
The -h argument is intended to be used in the LINE pragma, and the input should be read from the input file and written to the output file.
lhs2tex was reading the contents of fp and using that rather than the infile argument which was only noticed when using lhs2tex as a preprocessor with ghcide.