Commit 1b984186 authored by simonmar's avatar simonmar
Browse files

[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.
parent 1f81c9b1
......@@ -771,11 +771,15 @@ 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)
:: LHsExpr RdrName
-> LHsType RdrName
Supports Markdown
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