fixing filepath.

This commit is contained in:
Kazu Yamamoto 2011-05-26 14:43:53 +09:00
parent 0ac5bd9c50
commit 819d915aae

View File

@ -12,6 +12,7 @@ import HscTypes
import Outputable hiding (showSDoc) import Outputable hiding (showSDoc)
import Prelude hiding (catch) import Prelude hiding (catch)
import Pretty import Pretty
import System.FilePath
import Types import Types
---------------------------------------------------------------- ----------------------------------------------------------------
@ -54,7 +55,7 @@ showErrMsg :: ErrMsg -> String
showErrMsg err = file ++ ":" ++ line ++ ":" ++ col ++ ":" ++ msg ++ "\0" ++ ext showErrMsg err = file ++ ":" ++ line ++ ":" ++ col ++ ":" ++ msg ++ "\0" ++ ext
where where
spn = head (errMsgSpans err) spn = head (errMsgSpans err)
file = unpackFS (srcSpanFile spn) file = takeFileName $ unpackFS (srcSpanFile spn)
line = show (srcSpanStartLine spn) line = show (srcSpanStartLine spn)
col = show (srcSpanStartCol spn) col = show (srcSpanStartCol spn)
msg = showSDoc (errMsgShortDoc err) msg = showSDoc (errMsgShortDoc err)