projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
wibble
[ghc-hetmet.git]
/
compiler
/
ghci
/
InteractiveUI.hs
diff --git
a/compiler/ghci/InteractiveUI.hs
b/compiler/ghci/InteractiveUI.hs
index
486d403
..
055b716
100644
(file)
--- a/
compiler/ghci/InteractiveUI.hs
+++ b/
compiler/ghci/InteractiveUI.hs
@@
-70,6
+70,7
@@
import System.Exit ( exitWith, ExitCode(..) )
import System.Directory
import System.IO
import System.IO.Error as IO
import System.Directory
import System.IO
import System.IO.Error as IO
+import System.FilePath
import Data.Char
import Data.Dynamic
import Data.Array
import Data.Char
import Data.Dynamic
import Data.Array
@@
-555,6
+556,7
@@
runCommandEval c = ghciHandle handleEval (doCommand c)
runStmt :: String -> SingleStep -> GHCi Bool
runStmt stmt step
| null (filter (not.isSpace) stmt) = return False
runStmt :: String -> SingleStep -> GHCi Bool
runStmt stmt step
| null (filter (not.isSpace) stmt) = return False
+ | ["import", mod] <- words stmt = keepGoing setContext ('+':mod)
| otherwise
= do st <- getGHCiState
session <- getSession
| otherwise
= do st <- getGHCiState
session <- getSession
@@
-1774,7
+1776,8
@@
listModuleLine modl line = do
-- If the highlight flag is True, also highlight the span using
-- start_bold/end_bold.
listAround span do_highlight = do
-- If the highlight flag is True, also highlight the span using
-- start_bold/end_bold.
listAround span do_highlight = do
- contents <- BS.readFile (unpackFS file)
+ pwd <- getEnv "PWD"
+ contents <- BS.readFile (pwd </> unpackFS file)
let
lines = BS.split '\n' contents
these_lines = take (line2 - line1 + 1 + pad_before + pad_after) $
let
lines = BS.split '\n' contents
these_lines = take (line2 - line1 + 1 + pad_before + pad_after) $