ghc-mod
ghc-mod copied to clipboard
check with --map-file shows temporary file
a.hs
a :: Int
a :: Int
a = 5
main :: IO ()
main = print a
ghc-mod --map-file b.hs=a.hs check b.hs
b.hs:3:1:Duplicate type signatures for ‘a’at a.hs:1:1 a.hs:3:1
I expected to see
b.hs:3:1:Duplicate type signatures for ‘a’at b.hs:1:1 b.hs:3:1
instead
Related to #653 and #692 i think
@lierdakil I invoke thee. I don't remember if we ever did do this correctly :)
Generally speaking, it works, but there are some corner cases, like this one, because I am an idiot and tried to work on output directly.
But there was a reasonable idea on IRC: why don't we just use LINE
pragmas? I'm going to make a proof-of-concept now.
See https://github.com/DanielG/ghc-mod/pull/906