From: Ian Lynagh Date: Fri, 4 May 2007 22:18:57 +0000 (+0000) Subject: Panic properly if wrongKindOfFamily is given an unexpected family X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=a1632b0af860d28589b444d8e28896bee8bced38 Panic properly if wrongKindOfFamily is given an unexpected family Used to just give a "Non-exhaustive patterns" failure --- diff --git a/compiler/typecheck/TcTyClsDecls.lhs b/compiler/typecheck/TcTyClsDecls.lhs index dbf83fb..76b9a9e 100644 --- a/compiler/typecheck/TcTyClsDecls.lhs +++ b/compiler/typecheck/TcTyClsDecls.lhs @@ -1197,6 +1197,7 @@ wrongKindOfFamily family = kindOfFamily | isSynTyCon family = ptext SLIT("type synonym") | isDataTyCon family = ptext SLIT("data type") | isNewTyCon family = ptext SLIT("newtype") + | otherwise = pprPanic "wrongKindOfFamily" (ppr family) emptyConDeclsErr tycon = sep [quotes (ppr tycon) <+> ptext SLIT("has no constructors"),