From f03f49b0e2de91fdec3ef8e40f2e23258076980c Mon Sep 17 00:00:00 2001 From: Pepe Iborra Date: Sun, 20 May 2007 23:24:14 +0000 Subject: [PATCH] Get the path right for :list --- compiler/ghci/InteractiveUI.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler/ghci/InteractiveUI.hs b/compiler/ghci/InteractiveUI.hs index 3bda8bd..055b716 100644 --- 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.FilePath import Data.Char import Data.Dynamic import Data.Array @@ -1775,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 - 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) $ -- 1.7.10.4