diff --git a/ghc/utils/hscpp/hscpp.prl b/ghc/utils/hscpp/hscpp.prl
index e56ef269cedb24eb44e7600b0d880195977214ff..5c08b9b125f22431e56c66cc94a6ba1f95f5f973 100644
--- a/ghc/utils/hscpp/hscpp.prl
+++ b/ghc/utils/hscpp/hscpp.prl
@@ -36,11 +36,10 @@ open(INPIPE, "$Cpp @args - <$file |")
 
 while (<INPIPE>) {
 
-# line directives come in flavo[u]rs:
+    s/^#\s*line\s+(\d+)\s+\"\"$/\{\-# LINE \1 \"$file\" \-\}/;
+    s/^#\s*(\d+)\s+\"\"/\{\-# LINE \1 \"$file\" \-\}/;
 
-    s/^#\s*line\s+(\d+)\s+(\"\")$//;
-    s/^#\s*(\d+)\s+(\"\").*//;  # these are a result of our using stdin in
-				# the $(CPP) command line above.
+# line directives come in flavo[u]rs:
 
 #   s/^#\s*line\s+\d+$/\{\-# LINE \-\}/;   IGNORE THIS ONE FOR NOW
     s/^#\s*line\s+(\d+)\s+(\".+\")$/\{\-# LINE \1 \2 \-\}/;