X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FbasicTypes%2FSrcLoc.lhs;fp=ghc%2Fcompiler%2FbasicTypes%2FSrcLoc.lhs;h=3dccd51cb18a6069567e730c71353c31dc87b107;hb=d74118a7d0d0b95e3525e5689491d529ff992065;hp=89947d777a4ba037f8fdf9f90e759bf9ac239e76;hpb=074d99bd864680f896b671fa354fcca6be77ae12;p=ghc-hetmet.git diff --git a/ghc/compiler/basicTypes/SrcLoc.lhs b/ghc/compiler/basicTypes/SrcLoc.lhs index 89947d7..3dccd51 100644 --- a/ghc/compiler/basicTypes/SrcLoc.lhs +++ b/ghc/compiler/basicTypes/SrcLoc.lhs @@ -132,12 +132,8 @@ instance Outputable SrcLoc where hcat [text "{-# LINE ", int IBOX(src_line), space, char '\"', ptext src_path, text " #-}"] where - src_file = remove_directory_prefix (unpackFS src_path) - - remove_directory_prefix path = case break (== '/') path of - (filename, []) -> filename - (prefix, slash : rest) -> ASSERT( slash == '/' ) - remove_directory_prefix rest + src_file = unpackFS src_path -- Leave the directory prefix intact, + -- so emacs can find the file ppr (UnhelpfulSrcLoc s) = ptext s