From 4d7fed4e9191bb92860aad48ae0b8899882c8ab6 Mon Sep 17 00:00:00 2001 From: "simonpj@microsoft.com" Date: Mon, 28 Jan 2008 21:34:29 +0000 Subject: [PATCH] Add missing (error) case in isIrrefutablePat --- compiler/hsSyn/HsPat.lhs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/compiler/hsSyn/HsPat.lhs b/compiler/hsSyn/HsPat.lhs index 6b294c1..53a8bc0 100644 --- a/compiler/hsSyn/HsPat.lhs +++ b/compiler/hsSyn/HsPat.lhs @@ -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} -- 1.7.10.4