git.iko.soy/typeable/schematic
on master help sign in
Merge pull request #16 from AnisimoffNikita/master

[Add] Missing instances for ReprBoolean

commit70d7d8d8cfa5dc9e7a159eb1399c2fddfb0aa2bf authorDenis Redozubov <denis.redozubov@gmail.com> dateMon 25 Feb 2019, 19:36 (8 years ago) parent0d5061b1a2f425
1 file changed+10−1
src/Data/Schematic/Schema.hs+10−1
src/Data/Schematic/Schema.hs+10−1
@@ -12,8 +12,8 @@ import Data.Aeson.Types as J
1212import Data.HashMap.Strict as H
1313import Data.Kind
1414import Data.Maybe
15−import Data.Schematic.Instances ()
1615import Data.Schematic.Generator
16+import Data.Schematic.Instances ()
1717import Data.Scientific
1818import Data.Singletons.Prelude.List hiding (All, Union)
1919import Data.Singletons.TH
@@ -368,6 +368,9 @@ instance Show (JsonRepr ('SchemaText cs)) where
368368instance Show (JsonRepr ('SchemaNumber cs)) where
369369 show (ReprNumber n) = "ReprNumber " P.++ show n
370370
371+instance Show (JsonRepr 'SchemaBoolean) where
372+ show (ReprBoolean n) = "ReprBoolena " P.++ show n
373+
371374instance Show (JsonRepr 'SchemaNull) where show _ = "ReprNull"
372375
373376instance Show (JsonRepr s) => Show (JsonRepr ('SchemaArray acs s)) where
@@ -388,6 +391,9 @@ instance Eq (JsonRepr ('SchemaText cs)) where
388391instance Eq (JsonRepr ('SchemaNumber cs)) where
389392 ReprNumber a == ReprNumber b = a == b
390393
394+instance Eq (JsonRepr 'SchemaBoolean) where
395+ ReprBoolean a == ReprBoolean b = a == b
396+
391397instance Eq (JsonRepr 'SchemaNull) where
392398 ReprNull == ReprNull = True
393399
@@ -406,6 +412,9 @@ instance Ord (JsonRepr ('SchemaText cs)) where
406412instance Ord (JsonRepr ('SchemaNumber cs)) where
407413 ReprNumber a `compare` ReprNumber b = a `compare` b
408414
415+instance Ord (JsonRepr 'SchemaBoolean) where
416+ ReprBoolean a `compare` ReprBoolean b = a `compare` b
417+
409418instance Ord (JsonRepr 'SchemaNull) where
410419 compare _ _ = EQ
411420