git.iko.soy/typeable/schematic
on master help sign in
Redundant constraints
894df72Denis Redozubov
src/Data/Schematic/Lens.hs+4−12
@@ -191,25 +191,17 @@ obj = iso (\(ReprObject r) -> r) ReprObject
191arr :: Iso' (JsonRepr ('SchemaArray cs schema)) (V.Vector (JsonRepr schema))
191arr :: Iso' (JsonRepr ('SchemaArray cs schema)) (V.Vector (JsonRepr schema))
192arr = iso (\(ReprArray r) -> r) ReprArray
192arr = iso (\(ReprArray r) -> r) ReprArray
193
193
194−uni
195− :: SingI (h ': tl)
196− => Iso' (JsonRepr ('SchemaUnion (h ': tl))) (Union JsonRepr (h ': tl))
194+uni :: Iso' (JsonRepr ('SchemaUnion (h ': tl))) (Union JsonRepr (h ': tl))
197uni = iso (\(ReprUnion u) -> u) ReprUnion
195uni = iso (\(ReprUnion u) -> u) ReprUnion
198
196
199−txt
200− :: SingI cs
201− => Iso' (JsonRepr ('SchemaText cs)) Text
197+txt :: Iso' (JsonRepr ('SchemaText cs)) Text
202txt = iso (\(ReprText t) -> t) ReprText
198txt = iso (\(ReprText t) -> t) ReprText
203
199
204−num
205− :: SingI cs
206− => Iso' (JsonRepr ('SchemaNumber cs)) Scientific
200+num :: Iso' (JsonRepr ('SchemaNumber cs)) Scientific
207num = iso (\(ReprNumber t) -> t) ReprNumber
201num = iso (\(ReprNumber t) -> t) ReprNumber
208
202
209bln :: Iso' (JsonRepr 'SchemaBoolean) Bool
203bln :: Iso' (JsonRepr 'SchemaBoolean) Bool
210bln = iso (\(ReprBoolean b) -> b) ReprBoolean
204bln = iso (\(ReprBoolean b) -> b) ReprBoolean
211
205
212−opt
213− :: SingI schema
214− => Iso' (JsonRepr ('SchemaOptional schema)) (Maybe (JsonRepr schema))
206+opt :: Iso' (JsonRepr ('SchemaOptional schema)) (Maybe (JsonRepr schema))
215opt = iso (\(ReprOptional o) -> o) ReprOptional
207opt = iso (\(ReprOptional o) -> o) ReprOptional