@@ -271,7 +271,8 @@ elabCon info syn tn codata expkind dkind (doc, argDocs, n, t_in, fc, forcenames)
271271 getNamePos _ _ _ = Nothing
272272
273273 -- if the constructor is a UniqueType, the datatype must be too
274− -- (Type* is fine, since that is checked for uniqueness too)
274+ -- (AnyType is fine, since that is checked for uniqueness too)
275+ -- if hte contructor is AnyType, the datatype must be at least AnyType
275276 checkUniqueKind (UType NullType) (UType NullType) = return ()
276277 checkUniqueKind (UType NullType) _
277278 = tclift $ tfail (At fc (UniqueKindError NullType n))
@@ -279,7 +280,10 @@ elabCon info syn tn codata expkind dkind (doc, argDocs, n, t_in, fc, forcenames)
279280 checkUniqueKind (UType UniqueType) (UType AllTypes) = return ()
280281 checkUniqueKind (UType UniqueType) _
281282 = tclift $ tfail (At fc (UniqueKindError UniqueType n))
282− checkUniqueKind (UType AllTypes) _ = return ()
283+ checkUniqueKind (UType AllTypes) (UType AllTypes) = return ()
284+ checkUniqueKind (UType AllTypes) (UType UniqueType) = return ()
285+ checkUniqueKind (UType AllTypes) _
286+ = tclift $ tfail (At fc (UniqueKindError AllTypes n))
283287 checkUniqueKind _ _ = return ()
284288
285289 -- Constructor's kind must be <= expected kind