@@ -271,7 +271,8 @@ elabCon info syn tn codata expkind dkind (doc, argDocs, n, t_in, fc, forcenames)
271 getNamePos _ _ _ = Nothing
271 getNamePos _ _ _ = Nothing
273 -- if the constructor is a UniqueType, the datatype must be too
273 -- 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
275 checkUniqueKind (UType NullType) (UType NullType) = return ()
276 checkUniqueKind (UType NullType) (UType NullType) = return ()
276 checkUniqueKind (UType NullType) _
277 checkUniqueKind (UType NullType) _
277 = tclift $ tfail (At fc (UniqueKindError NullType n))
278 = 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)
279 checkUniqueKind (UType UniqueType) (UType AllTypes) = return ()
280 checkUniqueKind (UType UniqueType) (UType AllTypes) = return ()
280 checkUniqueKind (UType UniqueType) _
281 checkUniqueKind (UType UniqueType) _
281 = tclift $ tfail (At fc (UniqueKindError UniqueType n))
282 = 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))
283 checkUniqueKind _ _ = return ()
287 checkUniqueKind _ _ = return ()
285 -- Constructor's kind must be <= expected kind
289 -- Constructor's kind must be <= expected kind