Make hsc2hs emit the full path name in {-# LINE #-} pagmas.
authorDuncan Coutts <duncan.coutts@worc.ox.ac.uk>
Sun, 22 Jan 2006 01:18:31 +0000 (01:18 +0000)
committerDuncan Coutts <duncan.coutts@worc.ox.ac.uk>
Sun, 22 Jan 2006 01:18:31 +0000 (01:18 +0000)
For one thing this is the right thing to do anyway, it's what other tools do.
Secondly it allows haddock to produce accurate source code links.

ghc/utils/hsc2hs/Main.hs

index e8b759e..4b39e4a 100644 (file)
@@ -871,7 +871,7 @@ outCLine (SourcePos name line) =
 outHsLine :: SourcePos -> String
 outHsLine (SourcePos name line) =
     "    hsc_line ("++show (line + 1)++", \""++
-    showCString (snd (splitName name))++"\");\n"
+    showCString name++"\");\n"
 
 showCString :: String -> String
 showCString = concatMap showCChar