Reputation: 2210
Very specific use case: I'm building an autotester system, where students submit their assignments, which is automarked.
However, VSCode will often insert bogus imports, which cannot get resolved on the testing machine. However, those modules are never used. Is thee a way to ignore the error, and force compilation? Something like -fdefer-out-of-scope-variables
?
This is the kind of error, can I forcefully ignore it, and throw only if a symbol cannot be resolved?:
Submission.hs:5:1: error:
Failed to load interface for ‘GHC.CmmToAsm.PPC.Instr’
Use -v to see a list of the files searched for.
Upvotes: 1
Views: 84
Reputation: 91837
I'm confused. Are your studends using VSCode and submitting solutions with bad imports? If so, tell them to stop doing it if they want a grade.
Or is VSCode somehow part of your workflow when grading, and it's editing student files to have bad imports? If so, either figure out how you're misusing VSCode, or use a different tool than VSCode to compile.
Either way, trying to trick GHC into compiling invalid source files doesn't seem like the right approach.
Upvotes: 1