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

Allow newtypes to be promoted

Fixes Trac #7488
parent 3394d49a
......@@ -1035,8 +1035,9 @@ isPromotableType _ = False
-- If tc's kind is [ *^n -> * ] returns [ Just n ], else returns [ Nothing ]
isPromotableTyCon :: TyCon -> Maybe Int
isPromotableTyCon tc
| isDataTyCon tc -- Only *data* types can be promoted, not newtypes
-- not synonyms, not type families
| isDataTyCon tc || isNewTyCon tc
-- Only *data* and *newtype* types can be promoted,
-- not synonyms, not type/data families
, all isLiftedTypeKind (res:args) = Just $ length args
| otherwise = Nothing
where
......
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