projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ab94ec4
)
Panic properly if wrongKindOfFamily is given an unexpected family
author
Ian Lynagh
<igloo@earth.li>
Fri, 4 May 2007 22:18:57 +0000
(22:18 +0000)
committer
Ian Lynagh
<igloo@earth.li>
Fri, 4 May 2007 22:18:57 +0000
(22:18 +0000)
Used to just give a "Non-exhaustive patterns" failure
compiler/typecheck/TcTyClsDecls.lhs
patch
|
blob
|
history
diff --git
a/compiler/typecheck/TcTyClsDecls.lhs
b/compiler/typecheck/TcTyClsDecls.lhs
index
dbf83fb
..
76b9a9e
100644
(file)
--- 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"),