@@ -393,6 +393,24 @@ instance Eq (JsonRepr s) => Eq (JsonRepr ('SchemaArray as s)) where
393instance Eq (JsonRepr s) => Eq (JsonRepr ('SchemaOptional s)) where
393instance Eq (JsonRepr s) => Eq (JsonRepr ('SchemaOptional s)) where
394 ReprOptional a == ReprOptional b = a == b
394 ReprOptional a == ReprOptional b = a == b
396+instance Ord (Rec FieldRepr fs) => Ord (JsonRepr ('SchemaObject fs)) where
397+ ReprObject a `compare` ReprObject b = a `compare` b
399+instance Ord (JsonRepr ('SchemaText cs)) where
400+ ReprText a `compare` ReprText b = a `compare` b
402+instance Ord (JsonRepr ('SchemaNumber cs)) where
403+ ReprNumber a `compare` ReprNumber b = a `compare` b
405+instance Ord (JsonRepr 'SchemaNull) where
408+instance Ord (JsonRepr s) => Ord (JsonRepr ('SchemaArray as s)) where
409+ ReprArray a `compare` ReprArray b = a `compare` b
411+instance Ord (JsonRepr s) => Ord (JsonRepr ('SchemaOptional s)) where
412+ ReprOptional a `compare` ReprOptional b = a `compare` b
396instance IsList (JsonRepr ('SchemaArray cs s)) where
414instance IsList (JsonRepr ('SchemaArray cs s)) where
397 type Item (JsonRepr ('SchemaArray cs s)) = JsonRepr s
415 type Item (JsonRepr ('SchemaArray cs s)) = JsonRepr s
398 fromList = ReprArray . GHC.Exts.fromList
416 fromList = ReprArray . GHC.Exts.fromList