Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
jberryman
GHC
Commits
f904833c
Commit
f904833c
authored
May 06, 2004
by
simonpj
Browse files
[project @ 2004-05-06 12:25:49 by simonpj]
Fix (head []) value for src span in mkSimpleMatch
parent
a731a252
Changes
1
Hide whitespace changes
Inline
Side-by-side
ghc/compiler/hsSyn/HsUtils.lhs
View file @
f904833c
...
...
@@ -54,8 +54,12 @@ mkHsPar e = L (getLoc e) (HsPar e)
mkSimpleMatch :: [LPat id] -> LHsExpr id -> Type -> LMatch id
mkSimpleMatch pats rhs rhs_ty
=
addCLoc (head pats) rhs
$
=
L loc
$
Match pats Nothing (GRHSs (unguardedRHS rhs) [] rhs_ty)
where
loc = case pats of
[] -> getLoc rhs
(pat:_) -> combineSrcSpans (getLoc pat) (getLoc rhs)
unguardedRHS :: LHsExpr id -> [LGRHS id]
unguardedRHS rhs@(L loc _) = [L loc (GRHS [L loc (ResultStmt rhs)])]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment