Commit a3f68cac authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Do not promote data families

parent bb08287c
......@@ -1029,7 +1029,9 @@ isPromotableType ty
-- If tc's kind is [ *^n -> * ] returns [ Just n ], else returns [ Nothing ]
isPromotableTyCon :: TyCon -> Maybe Int
isPromotableTyCon tc
| all isLiftedTypeKind (res:args) = Just $ length args
| isDataTyCon tc -- Only *data* types can be promoted, not newtypes
-- not synonyms, not type families
, all isLiftedTypeKind (res:args) = Just $ length args
| otherwise = Nothing
where
(args, res) = splitKindFunTys (tyConKind tc)
......
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