ghc-mod icon indicating copy to clipboard operation
ghc-mod copied to clipboard

check with --map-file shows temporary file

Open voanhduy1512 opened this issue 7 years ago • 3 comments

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

voanhduy1512 avatar Aug 13 '17 12:08 voanhduy1512

@lierdakil I invoke thee. I don't remember if we ever did do this correctly :)

DanielG avatar Aug 22 '17 20:08 DanielG

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.

lierdakil avatar Aug 23 '17 09:08 lierdakil

See https://github.com/DanielG/ghc-mod/pull/906

lierdakil avatar Aug 23 '17 12:08 lierdakil