Closed noughtmare closed 4 years ago
Cool solution. It can cause problems if your GHC or UUAGC version changes (the old files will remain in their own directory), but that can be easily fixed by running cabal v2-clean
.
I drop the whole dist-newstyle
directory, which is essentially the same as cabal v2-clean
I guess.
It doesn't work anymore with the new cabal commands. The generated files are no longer stored in
dist/build/
. And, now, theLINE
pragmas include the full file path which is not portable.Maybe cabal has some options to get the relative file path back and to find the location of the generated .hs files.
EDIT: I actually think the old paths in half of the
LINE
pragmas were wrong anyway, so maybe those lines should just be filtered out or maybe they shouldn't be generated in the first place?EDIT: So, half of the pragmas are not wrong (but they do point to the old location from before the files were moved into src-generated). They point back to the current file for errors that happen in portions of the code that were not based on lines in the original .ag file. We could rewrite these paths with a simple regex. Something like this should work: