An exceptionfree readFile or filtering for -xc
In order to reduce the amount of lines in the logs that are false positives, I'd like to have a version of
readFile that does not log exceptions. The current
ioe_eof (IIRC) to exit, and this means that if you run with
+RTS -xc -RTS, an error is output to the logs.
To get past this I created a library called
exceptionfree-readfile (suggestions/issues/PRs welcome, perf is 1x-10x worse than the code in
base), but it was mentioned that I should submit this to the issue tracker to see if there's another way people work around it/a better way.
Alternatively a way to filter the modules that are captured by
-xc would be much easier way to solve this problem -- as my goal was reducing the amount of false positives that showed up in the logs (a few libraries use exceptions in this way).
Proposal (2 alternatives)
base with a
A function called
readFileEither :: FilePath -> IO (Either IOError String) is created and added to
Adding an option like
--xc-ignored-modules to GHC
An option like
--xc-ignored-modules is added that contains a list of modules that are checked when
-xc-related logging is done, to ignore certain modules.