X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=ghc%2Fcompiler%2Fparser%2FRdrHsSyn.lhs;h=b51c2d5a9b592770205de16a82a6df28aace1ae8;hb=1b9841866c2b49484a3af10ab2d8f5bb6d68ab84;hp=6fb6e86d6874e77a404d34e78b1ed37d16cf3bfe;hpb=1f81c9b1f21945b2e6772828576e766e6f1238cf;p=ghc-hetmet.git 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