@@ -44,7 +44,7 @@ data TextConstraint
4444 deriving (Generic)
4545
4646instance SingKind TextConstraint where
47− type DemoteRep TextConstraint = DemotedTextConstraint
47+ type Demote TextConstraint = DemotedTextConstraint
4848 fromSing = \case
4949 STEq n -> withKnownNat n (DTEq $ natVal n)
5050 STLt n -> withKnownNat n (DTLt $ natVal n)
@@ -75,7 +75,7 @@ instance SingKind TextConstraint where
7575 Nothing -> error "Negative singleton nat"
7676 DTRegex s -> case someSymbolVal (T.unpack s) of
7777 SomeSymbol (_ :: Proxy n) -> SomeSing (STRegex (SSym :: Sing n))
78− DTEnum ss -> case toSing (T.unpack <$> ss) of
78+ DTEnum ss -> case toSing ss of
7979 SomeSing l -> SomeSing (STEnum l)
8080
8181data DemotedTextConstraint
@@ -149,7 +149,7 @@ instance Eq (Sing ('NGt n)) where _ == _ = True
149149instance Eq (Sing ('NGe n)) where _ == _ = True
150150
151151instance SingKind NumberConstraint where
152− type DemoteRep NumberConstraint = DemotedNumberConstraint
152+ type Demote NumberConstraint = DemotedNumberConstraint
153153 fromSing = \case
154154 SNEq n -> withKnownNat n (DNEq $ natVal n)
155155 SNGt n -> withKnownNat n (DNGt $ natVal n)
@@ -189,7 +189,7 @@ instance KnownNat n => SingI ('AEq n) where sing = SAEq sing
189189instance Eq (Sing ('AEq n)) where _ == _ = True
190190
191191instance SingKind ArrayConstraint where
192− type DemoteRep ArrayConstraint = DemotedArrayConstraint
192+ type Demote ArrayConstraint = DemotedArrayConstraint
193193 fromSing = \case
194194 SAEq n -> withKnownNat n (DAEq $ natVal n)
195195 toSing = \case
@@ -250,7 +250,7 @@ instance Eq (Sing ('SchemaObject cs)) where _ == _ = True
250250instance Eq (Sing ('SchemaOptional s)) where _ == _ = True
251251
252252instance SingKind Schema where
253− type DemoteRep Schema = DemotedSchema
253+ type Demote Schema = DemotedSchema
254254 fromSing = \case
255255 SSchemaText cs -> DSchemaText $ fromSing cs
256256 SSchemaNumber cs -> DSchemaNumber $ fromSing cs
@@ -275,7 +275,7 @@ instance SingKind Schema where
275275 DSchemaOptional sch -> case toSing sch of
276276 SomeSing ssch -> SomeSing $ SSchemaOptional ssch
277277 DSchemaNull -> SomeSing SSchemaNull
278− DSchemaObject cs -> case toSing ((\(sym,sch) -> (T.unpack sym, sch)) <$> cs) of
278+ DSchemaObject cs -> case toSing cs of
279279 SomeSing scs -> SomeSing $ SSchemaObject scs
280280
281281data FieldRepr :: (Symbol, Schema) -> Type where