File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 44module Data.Schematic.Migration where
55
66import Data.Kind
7- import Data.List
87import Data.Schematic.DSL
98import Data.Schematic.Lens
109import Data.Schematic.Path
Original file line number Diff line number Diff line change @@ -393,6 +393,24 @@ instance Eq (JsonRepr s) => Eq (JsonRepr ('SchemaArray as s)) where
393393instance Eq (JsonRepr s ) => Eq (JsonRepr ('SchemaOptional s )) where
394394 ReprOptional a == ReprOptional b = a == b
395395
396+ instance Ord (Rec FieldRepr fs ) => Ord (JsonRepr ('SchemaObject fs )) where
397+ ReprObject a `compare` ReprObject b = a `compare` b
398+
399+ instance Ord (JsonRepr ('SchemaText cs )) where
400+ ReprText a `compare` ReprText b = a `compare` b
401+
402+ instance Ord (JsonRepr ('SchemaNumber cs )) where
403+ ReprNumber a `compare` ReprNumber b = a `compare` b
404+
405+ instance Ord (JsonRepr 'SchemaNull) where
406+ compare _ _ = EQ
407+
408+ instance Ord (JsonRepr s ) => Ord (JsonRepr ('SchemaArray as s )) where
409+ ReprArray a `compare` ReprArray b = a `compare` b
410+
411+ instance Ord (JsonRepr s ) => Ord (JsonRepr ('SchemaOptional s )) where
412+ ReprOptional a `compare` ReprOptional b = a `compare` b
413+
396414instance IsList (JsonRepr ('SchemaArray cs s )) where
397415 type Item (JsonRepr ('SchemaArray cs s )) = JsonRepr s
398416 fromList = ReprArray . GHC.Exts. fromList
You can’t perform that action at this time.
0 commit comments