rebellion
rebellion copied to clipboard
Integrate Rebellion data types with lenses
This issue is specifically about data types in rebellion/base
and rebellion/collection
.
- Either provide lenses directly from the library (and add a dependency on the
lens-common
package) - Or expose enough of the implementations so that making a
rebellion-lens
package is possible
As a proof of concept (and I needed it for a project) I built some lenses for records and tables for review/discussion. For records (record-field-lens
) there is enough access, but the interface is a little awkward. To make the table lenses (table-columns-lens
, table-column-lens
, table-value-lens
) work I provided table constructor and accessors from a submodule only to the lens module.
I've wanted to redo the lens library completely for a few years now, as part of Rebellion. Maybe some modules like this:
-
rebellion/optic/lens
-
rebellion/optic/prism
-
rebellion/optic/traversal
-
rebellion/optic/converter
...and possibly others. As a result, I'm a little wary of Rebellion depending on the current lens API. All that aside, tables and records definitely should expose more functionality so it's possible to make lenses from their public APIs.