@@ -7,14 +7,9 @@
77
88module Data.Schematic.Schema where
99
10−import Data.Functor.Foldable
1110import Data.Kind hiding (Type)
1211import Data.Proxy
13−import Data.Singletons.TH
1412import Data.Text (Text)
15−import Data.Type.Equality
16−import Data.Vinyl
17−import Data.Vinyl.Functor
1813import GHC.TypeLits (KnownNat, natVal, KnownSymbol, symbolVal, Symbol, Nat)
1914
2015
@@ -133,18 +128,12 @@ instance (Verifiable 'JText cs) => Schematic (SText cs) where
133128 type JT (SText cs) = 'JText
134129 build _ = constructor (Proxy @(JT (SText cs))) $ schema (Proxy @JText) (Proxy @cs)
135130
136−-- example
137−type TextSchema = SText '[LengthEqNat 3]
138−
139131data SNumber cs
140132
141133instance (Verifiable 'JNumber cs) => Schematic (SNumber cs) where
142134 type JT (SNumber cs) = 'JNumber
143135 build _ = constructor (Proxy @(JT (SNumber cs))) $ schema (Proxy @'JNumber) (Proxy @cs)
144136
145−-- example
146−type NumberSchema = SNumber '[ Gt 3]
147−
148137instance (Verifiable (JT ty) cs, SchemaConstructor (JT ty)) => Schematic (Field field ty cs) where
149138 type JT (Field field ty cs) = JT ty
150139 build _ = constructor (Proxy @(JT (Field field ty cs)))
@@ -170,5 +159,3 @@ instance Schematic (SObject els) => TopLevel (SObject els)
170159-- => Proxy (SObject els)
171160-- -> Schema
172161-- toSchema p = constructor p $ schema (Proxy @(JT (SObject els))) (Proxy @els)
173−
174−type TestStruct = SObject '[ Field "carrier" 'JText [SText '[LengthEqNat 3] ] ]