From: simonmar Date: Fri, 10 Sep 2004 13:58:55 +0000 (+0000) Subject: [project @ 2004-09-10 13:58:55 by simonmar] X-Git-Tag: Initial_conversion_from_CVS_complete~1615 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=1b9841866c2b49484a3af10ab2d8f5bb6d68ab84 [project @ 2004-09-10 13:58:55 by simonmar] Another SrcSpan fix: the span of a Match now covers the entire equation, not just the rhs. --- diff --git a/ghc/compiler/parser/RdrHsSyn.lhs b/ghc/compiler/parser/RdrHsSyn.lhs index 6fb6e86..b51c2d5 100644 --- 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 - 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) + checkValSig :: LHsExpr RdrName