From a1632b0af860d28589b444d8e28896bee8bced38 Mon Sep 17 00:00:00 2001
From: Ian Lynagh <igloo@earth.li>
Date: Fri, 4 May 2007 22:18:57 +0000
Subject: [PATCH] Panic properly if wrongKindOfFamily is given an unexpected
 family Used to just give a "Non-exhaustive patterns" failure

---
 compiler/typecheck/TcTyClsDecls.lhs | 1 +
 1 file changed, 1 insertion(+)

diff --git a/compiler/typecheck/TcTyClsDecls.lhs b/compiler/typecheck/TcTyClsDecls.lhs
index dbf83fb56a66..76b9a9ee40e4 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"),
-- 
GitLab