Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Shayne Fletcher
Glasgow Haskell Compiler
Commits
cbe382d4
Commit
cbe382d4
authored
Oct 26, 2010
by
simonpj@microsoft.com
Browse files
Make isIrrefutableHsPat say True for existentials; fixes Trac #4439
At last. A bug that is really easy to fix.
parent
9a81ddfb
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/hsSyn/HsPat.lhs
View file @
cbe382d4
...
...
@@ -47,6 +47,7 @@ import SrcLoc
import FastString
-- libraries:
import Data.Data hiding (TyCon)
import Data.Maybe
\end{code}
...
...
@@ -411,7 +412,9 @@ isIrrefutableHsPat pat
go1 (ConPatIn {}) = False -- Conservative
go1 (ConPatOut{ pat_con = L _ con, pat_args = details })
= isProductTyCon (dataConTyCon con)
= isJust (tyConSingleDataCon_maybe (dataConTyCon con))
-- NB: tyConSingleDataCon_maybe, *not* isProductTyCon, because
-- the latter is false of existentials. See Trac #4439
&& all go (hsConPatArgs details)
go1 (LitPat {}) = False
...
...
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