X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FhsSyn%2FHsPat.lhs;h=6cad66c67e943cb649d98c9a07b8adfeabcc16e7;hb=dd99b6f8c61f393087d03cd697c06051a43ca4e9;hp=6b294c1c42237e6c31bbf764e126b2b44ecb1105;hpb=83e979b3db9acba32973ce065fce6248ee0f59a6;p=ghc-hetmet.git diff --git a/compiler/hsSyn/HsPat.lhs b/compiler/hsSyn/HsPat.lhs index 6b294c1..6cad66c 100644 --- a/compiler/hsSyn/HsPat.lhs +++ b/compiler/hsSyn/HsPat.lhs @@ -328,7 +328,7 @@ mkCoPat co pat ty mkCoPatCoI :: CoercionI -> Pat id -> Type -> Pat id mkCoPatCoI IdCo pat _ = pat -mkCoPatCoI (ACo co) pat ty = mkCoPat (WpCo co) pat ty +mkCoPatCoI (ACo co) pat ty = mkCoPat (WpCast co) pat ty \end{code} @@ -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}