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