Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
4d7fed4e
Commit
4d7fed4e
authored
Jan 28, 2008
by
simonpj@microsoft.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing (error) case in isIrrefutablePat
parent
78ba30ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
compiler/hsSyn/HsPat.lhs
compiler/hsSyn/HsPat.lhs
+6
-2
No files found.
compiler/hsSyn/HsPat.lhs
View file @
4d7fed4e
...
...
@@ -398,7 +398,7 @@ isBangHsBind :: HsBind id -> Bool
isBangHsBind (PatBind { pat_lhs = L _ (BangPat _) }) = True
isBangHsBind _ = False
isIrrefutableHsPat :: LPat id -> Bool
isIrrefutableHsPat ::
OutputableBndr id =>
LPat id -> Bool
-- (isIrrefutableHsPat p) is true if matching against p cannot fail,
-- in the sense of falling through to the next pattern.
-- (NB: this is not quite the same as the (silly) defn
...
...
@@ -436,6 +436,10 @@ isIrrefutableHsPat pat
go1 (NPat _ _ _) = False
go1 (NPlusKPat _ _ _ _) = False
go1 (TypePat _) = panic "isIrrefutableHsPat: type pattern"
go1 (QuasiQuotePat {}) = urk pat -- Gotten rid of by renamer, before
-- isIrrefutablePat is called
go1 (TypePat {}) = urk pat
urk pat = pprPanic "isIrrefutableHsPat:" (ppr pat)
\end{code}
Write
Preview
Markdown
is supported
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