projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2004-09-10 13:58:55 by simonmar]
[ghc-hetmet.git]
/
ghc
/
compiler
/
parser
/
RdrHsSyn.lhs
diff --git
a/ghc/compiler/parser/RdrHsSyn.lhs
b/ghc/compiler/parser/RdrHsSyn.lhs
index
6fb6e86
..
b51c2d5
100644
(file)
--- a/
ghc/compiler/parser/RdrHsSyn.lhs
+++ b/
ghc/compiler/parser/RdrHsSyn.lhs
@@
-771,10
+771,14
@@
checkValDef lhs opt_sig (L rhs_span grhss)
then parseError (getLoc f) ("Qualified name in function definition: " ++
showRdrName (unLoc f))
else do ps <- checkPatterns es
then parseError (getLoc f) ("Qualified name in function definition: " ++
showRdrName (unLoc f))
else do ps <- checkPatterns es
- return (FunBind f inf [L rhs_span (Match ps opt_sig grhss)])
+ let match_span = combineSrcSpans (getLoc lhs) rhs_span
+ return (FunBind f inf [L match_span (Match ps opt_sig grhss)])
+ -- the span of the match covers the entire equation. That isn't
+ -- quite right, but it'll do for now.
| otherwise = do
lhs <- checkPattern lhs
return (PatBind lhs grhss)
| otherwise = do
lhs <- checkPattern lhs
return (PatBind lhs grhss)
+
checkValSig
:: LHsExpr RdrName
checkValSig
:: LHsExpr RdrName