import Base import ./ordinary_schema.bend as Schema import ./resource_field_binding.bend as Tree import ./owner_product.bend as Product import ./ordinary_optional_resource.bend as O # Same original descriptor, with a storage index tied to the exact identity. type Index<-S:Data,-P:Type,-identity:Schema.Resource> is Data: Index{} def leaf(~S:Data,~P:Type,+identity:Schema.Resource) -> Tree.Built,Index>: Tree.Built{Schema.entries(~S,~Unit,~P,Schema.resource_schema(~S,~P,identity)),Index{}} type Binding<-S:Data,-R:Type,-P:Type,-Rest:Type,-identity:Schema.Resource,-lens:Product.Lens,Rest>> is Data: Binding{} def bind(~S:Data,~R:Type,~P:Type,~Rest:Type,~identity:Schema.Resource,~lens:Product.Lens,Rest>,~cursor:Tree.Cursor,Rest,Index,lens>) -> Binding: Binding{}