Various caches for artifacts generated across the whole pipeline: source code, parsed
representations, imports data (dependencies and reverse dependencies, etc.)
Allows to match on SharedTerm without taking ownership of the matched part
until the match. In the wildcard pattern, we don’t take ownership, so we can
still use the richterm at that point.
Array for types implementing Into<RichTerm> (for elements). The array’s attributes are a
trailing (optional) ArrayAttrs, separated by a ;. mk_array!(Term::Num(42)) corresponds
to \[42\]. Here the attributes are ArrayAttrs::default(), though the evaluated array may
have different attributes.
Multi field record for types implementing Into<Ident> (for the identifiers), and
Into<RichTerm> for the fields. Identifiers and corresponding content are specified as a
tuple: mk_record!(("field1", t1), ("field2", t2)) corresponds to the record { field1 = t1; field2 = t2 }.
Multi-ary enum row constructor for types implementing Into<TypeWrapper>.
mk_uty_enum_row!(id1, .., idn; tail) correspond to [| 'id1, .., 'idn; tail |]. With the addition of algebraic data types (enum variants), individual rows can also take an additional type parameter, specified as a tuple: for example, mk_uty_enum_row!(id1, (id2, ty2); tail)is[| ’id1, ’id2 ty2; tail |]`.
Multi-ary record row constructor for types implementing Into<TypeWrapper>. mk_uty_row!((id1, ty1), .., (idn, tyn); tail) correspond to {id1: ty1, .., idn: tyn; tail}. The tail can be
omitted, in which case the empty row is uses as a tail instead.