| 1 | ## RBuild |
| 2 | |
| 3 | RBuild implements a handy syntax to build/update records, see |
| 4 | the [example](examples/usage_rbuild.v) file. In short |
| 5 | `« a .= v; b .= r »` and |
| 6 | `« r with a .= v »` without an explicit mention of the recrod type/constructor. |
| 7 | |
| 8 | On linux, `«` can be typed via `compose` + `<` + `<`. |
| 9 | |
| 10 | This app is experimental. |
| 11 | |
| 12 | ### Ideas |
| 13 | |
| 14 | - update not based on lenses, i.e. |
| 15 | `« x with a .= v »` epands to |
| 16 | `« a .= v; ... fi .= x.(fi) ... »` that is a special case of |
| 17 | `« ... »` when some fields are missing (instead of error user a default): |
| 18 | - pros: works even if lenses don't (dependent records) |
| 19 | - cons: no lemmas from lenses |
| 20 | - when a record is dependent, eg `Record r .= { t : Type; op : t -> t -> t }` |
| 21 | one could accept `« r with op .= f »` and expand it to |
| 22 | `« r with t .= _ ; op .= f »` |
| 23 | - liquid fields, eg `« .b .= v »` to mean any field called `b` (possibly deep) |
| 24 |