[project @ 2001-08-16 09:59:38 by simonmar]
authorsimonmar <unknown>
Thu, 16 Aug 2001 09:59:38 +0000 (09:59 +0000)
committersimonmar <unknown>
Thu, 16 Aug 2001 09:59:38 +0000 (09:59 +0000)
Set the SrcLoc for expressions typed on the command line to
<interactive>:1 rather than <no file>:0.

ghc/compiler/main/HscMain.lhs

index 0414d7f..8e8aa38 100644 (file)
@@ -576,7 +576,7 @@ hscParseStmt dflags str
 
       case parseStmt buf PState{ bol = 0#, atbol = 1#,
                                 context = [], glasgow_exts = glaexts,
-                                loc = mkSrcLoc SLIT("<no file>") 0 } of {
+                                loc = mkSrcLoc SLIT("<interactive>") 1 } of {
 
        PFailed err -> do { hPutStrLn stderr (showSDoc err);
 --     Not yet implemented in <4.11    freeStringBuffer buf;