@@ -331,20 +331,9 @@ data JsonRepr :: Schema -> Type where
331331 ReprArray :: V.Vector (JsonRepr s) -> JsonRepr ('SchemaArray cs s)
332332 ReprObject :: Rec FieldRepr fs -> JsonRepr ('SchemaObject fs)
333333 ReprOptional :: Maybe (JsonRepr s) -> JsonRepr ('SchemaOptional s)
334− ReprUnion
335− -- :: USubsets (h ': tl)
336− :: Union JsonRepr (h ': tl)
337− -> JsonRepr ('SchemaUnion (h ': tl))
334+ ReprUnion :: Union JsonRepr (h ': tl) -> JsonRepr ('SchemaUnion (h ': tl))
338335
339336-- | Move to the union package
340−type family UnionAll (f :: u -> *) (rs :: [u]) (c :: * -> Constraint) :: Constraint where
341− UnionAll f '[] c = ()
342− UnionAll f (r ': rs) c = (c (f r), UnionAll f rs c)
343−
344−-- instance (UnionAll f as Show) => Show (Union f as) where
345−-- show (This fa) = "This " P.++ show fa
346−-- show (That u) = "That " P.++ show u
347−
348337instance Show (JsonRepr ('SchemaText cs)) where
349338 show (ReprText t) = "ReprText " P.++ show t
350339
@@ -362,8 +351,6 @@ instance V.RecAll FieldRepr fs Show => Show (JsonRepr ('SchemaObject fs)) where
362351instance Show (JsonRepr s) => Show (JsonRepr ('SchemaOptional s)) where
363352 show (ReprOptional s) = "ReprOptional " P.++ show s
364353
365−deriving instance UnionAll f as Show => Show (Union f as)
366−
367354instance (Monad m, Serial m Text)
368355 => Serial m (JsonRepr ('SchemaText cs)) where
369356 series = cons1 ReprText