@@ -1,6 +1,7 @@
1{-# LANGUAGE AllowAmbiguousTypes #-}
1{-# LANGUAGE AllowAmbiguousTypes #-}
2−{-# LANGUAGE OverloadedLists #-}
3+{-# LANGUAGE OverloadedLists #-}
3−{-# LANGUAGE OverloadedStrings #-}
4+{-# LANGUAGE OverloadedStrings #-}
4{-# OPTIONS_GHC -fprint-explicit-kinds #-}
5{-# OPTIONS_GHC -fprint-explicit-kinds #-}
6module Data.Schematic.Schema where
7module Data.Schematic.Schema where
@@ -12,8 +13,8 @@ import Data.Aeson.Types as J
12import Data.HashMap.Strict as H
13import Data.HashMap.Strict as H
13import Data.Kind
14import Data.Kind
14import Data.Maybe
15import Data.Maybe
15−import Data.Schematic.Instances ()
16import Data.Schematic.Generator
16import Data.Schematic.Generator
17+import Data.Schematic.Instances ()
17import Data.Scientific
18import Data.Scientific
18import Data.Singletons.Prelude.List hiding (All, Union)
19import Data.Singletons.Prelude.List hiding (All, Union)
19import Data.Singletons.TH
20import Data.Singletons.TH
@@ -373,8 +374,16 @@ instance Show (JsonRepr 'SchemaNull) where show _ = "ReprNull"
373instance Show (JsonRepr s) => Show (JsonRepr ('SchemaArray acs s)) where
374instance Show (JsonRepr s) => Show (JsonRepr ('SchemaArray acs s)) where
374 show (ReprArray v) = "ReprArray " P.++ show v
375 show (ReprArray v) = "ReprArray " P.++ show v
377+#if MIN_VERSION_base(4,12,0)
379+ ( V.RecAll FieldRepr fs Show, RMap fs, ReifyConstraint Show FieldRepr fs
381+ => Show (JsonRepr ('SchemaObject fs)) where
382+ show (ReprObject fs) = "ReprObject " P.++ show fs
376instance V.RecAll FieldRepr fs Show => Show (JsonRepr ('SchemaObject fs)) where
384instance V.RecAll FieldRepr fs Show => Show (JsonRepr ('SchemaObject fs)) where
377 show (ReprObject fs) = "ReprObject " P.++ show fs
385 show (ReprObject fs) = "ReprObject " P.++ show fs
379instance Show (JsonRepr s) => Show (JsonRepr ('SchemaOptional s)) where
388instance Show (JsonRepr s) => Show (JsonRepr ('SchemaOptional s)) where
380 show (ReprOptional s) = "ReprOptional " P.++ show s
389 show (ReprOptional s) = "ReprOptional " P.++ show s