Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
9ebd6bae
Commit
9ebd6bae
authored
Jul 27, 2006
by
simonpj@microsoft.com
Browse files
Lazy patterns are like wild-cards for overlap warnings
MERGE TO STABLE Fixes Trac #827 Test is should_compiler/ds058
parent
5154a1ad
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/deSugar/Check.lhs
View file @
9ebd6bae
...
...
@@ -623,7 +623,8 @@ simplify_pat pat@(WildPat gt) = pat
simplify_pat (VarPat id) = WildPat (idType id)
simplify_pat (VarPatOut id _) = WildPat (idType id) -- Ignore the bindings
simplify_pat (ParPat p) = unLoc (simplify_lpat p)
simplify_pat (LazyPat p) = unLoc (simplify_lpat p)
simplify_pat (LazyPat p) = WildPat (hsPatType p) -- For overlap and exhaustiveness checking
-- purposes, a ~pat is like a wildcard
simplify_pat (BangPat p) = unLoc (simplify_lpat p)
simplify_pat (AsPat id p) = unLoc (simplify_lpat p)
simplify_pat (SigPatOut p _) = unLoc (simplify_lpat p) -- I'm not sure this is right
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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