projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
94356ab
)
[project @ 2004-05-06 12:28:07 by simonpj]
author
simonpj
<unknown>
Thu, 6 May 2004 12:28:07 +0000
(12:28 +0000)
committer
simonpj
<unknown>
Thu, 6 May 2004 12:28:07 +0000
(12:28 +0000)
Better location info
ghc/compiler/typecheck/TcBinds.lhs
patch
|
blob
|
history
diff --git
a/ghc/compiler/typecheck/TcBinds.lhs
b/ghc/compiler/typecheck/TcBinds.lhs
index
b0607e3
..
293ce10
100644
(file)
--- a/
ghc/compiler/typecheck/TcBinds.lhs
+++ b/
ghc/compiler/typecheck/TcBinds.lhs
@@
-41,7
+41,7
@@
import Name ( Name, getSrcLoc )
import NameSet
import Var ( tyVarKind )
import VarSet
import NameSet
import Var ( tyVarKind )
import VarSet
-import SrcLoc ( Located(..), srcLocSpan, unLoc, noLoc )
+import SrcLoc ( Located(..), srcLocSpan, unLoc, noLoc, getLoc )
import Bag
import Util ( isIn, equalLength )
import BasicTypes ( TopLevelFlag(..), RecFlag(..), isNonRec, isRec,
import Bag
import Util ( isIn, equalLength )
import BasicTypes ( TopLevelFlag(..), RecFlag(..), isNonRec, isRec,
@@
-268,8
+268,9
@@
tcBindWithSigs top_lvl mbind sigs is_rec
-- GENERALISE
-- (it seems a bit crude to have to do getLIE twice,
-- but I can't see a better way just now)
-- GENERALISE
-- (it seems a bit crude to have to do getLIE twice,
-- but I can't see a better way just now)
- addSrcSpan (srcLocSpan (minimum (map getSrcLoc binder_names))) $
- -- TODO: location wrong
+ addSrcSpan (getLoc (head (bagToList mbind))) $
+ -- TODO: location a bit awkward, but the mbinds have been
+ -- dependency analysed and may no longer be adjacent
addErrCtxt (genCtxt binder_names) $
getLIE (generalise binder_names mbind tau_tvs lie_req tc_ty_sigs)
addErrCtxt (genCtxt binder_names) $
getLIE (generalise binder_names mbind tau_tvs lie_req tc_ty_sigs)