Currently, Object schema allows schema to be any SchemaType. It would be nice to encode the stronger version: schema is only allowed to be the SchemaObject constructor.
This could potentially be implemented by changing SchemaType to be:
This change breaks other things, so would take some work into fixing up all the other areas. Off the top of my head, the schema quasiquoter would need to have a kind signature of SchemaObjectType, IsSchemaObject would need to be changed or removed, and there would need to be some SchemaObjectType -> SchemaType casting
Currently,
Object schema
allowsschema
to be anySchemaType
. It would be nice to encode the stronger version:schema
is only allowed to be theSchemaObject
constructor.This could potentially be implemented by changing
SchemaType
to be:and then change
Object
to be:This change breaks other things, so would take some work into fixing up all the other areas. Off the top of my head, the
schema
quasiquoter would need to have a kind signature ofSchemaObjectType
,IsSchemaObject
would need to be changed or removed, and there would need to be someSchemaObjectType -> SchemaType
casting