Commit d74118a7 authored by simonpj's avatar simonpj

[project @ 2000-04-20 12:50:18 by simonpj]

Dont strip directory prefix when printing src-locs
parent 074d99bd
......@@ -49,7 +49,7 @@ import Type ( Type, ClassContext, mkDictTy, mkDictTys, mkTyConApp, mkTyVarTys,
)
import PprType ( pprParendType )
import Module ( Module )
import CoreUtils ( mkInlineMe )
import CoreUtils ( exprType, mkInlineMe )
import CoreUnfold ( mkTopUnfolding, mkCompulsoryUnfolding, mkOtherCon )
import Subst ( mkTopTyVarSubst, substClasses )
import TyCon ( TyCon, isNewTyCon, tyConTyVars, tyConDataCons, isDataTyCon,
......@@ -429,9 +429,10 @@ there's nothing to do.
ToDo: unify with mkRecordSelId.
\begin{code}
mkDictSelId name clas ty
mkDictSelId name clas
= sel_id
where
ty = exprType rhs
sel_id = mkId name ty info
field_lbl = mkFieldLabel name ty tag
tag = assoc "MkId.mkDictSelId" (classSelIds clas `zip` allFieldLabelTags) sel_id
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment