Commit a1632b0a authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Panic properly if wrongKindOfFamily is given an unexpected family

Used to just give a "Non-exhaustive patterns" failure
parent ab94ec4b
......@@ -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"),
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment