@@ -110,3 +110,24 @@ It's possible to decode the latest version like this:
111decodeAndValidateJson schemaJsonTopVersion :: ParseResult (JsonRepr (TopVersion (AllVersions VS)))
111decodeAndValidateJson schemaJsonTopVersion :: ParseResult (JsonRepr (TopVersion (AllVersions VS)))
114+## Lens-compatibility
116+It's possible to use `flens` to construct a field lens for a typed object in schematic. Let's suppose you have a schema like this:
119+type ArraySchema = 'SchemaArray '[AEq 1] ('SchemaNumber '[NGt 10])
121+type ArrayField = '("foo", ArraySchema)
124+ '[ ArrayField, '("bar", 'SchemaOptional ('SchemaText '[TEnum '["foo", "bar"]]))]
126+type SchemaExample = 'SchemaObject FieldsSchema
130+There are two ways of working with named fields in the objects:
132+* Using the `fget` and `fset` functions: `fget fooProxy (fput newFooVal objectData) == newFooVal`
133+* Using the lens library: `set (flens (Proxy @"foo")) newFooVal objectData ^. flens (Proxy @"foo") == newFooVal`