Skip to main content

Module node

Module node 

Source
Expand description

Compound node kinds and the uniform view over both regions (03-value-model.md §4).

Every compound is canonical when it is built:

  • a set is a sorted array of distinct element handles;
  • a function with a contiguous integer domain lo..lo+n-1 is an IntFcn holding only its values; sequences and tuples are the case lo = 1, and the empty function is IntFcn with lo = 1;
  • any other function, records included, is a Fcn: its sorted keys, then its values.

So equal values have equal node contents, and structural equality is a comparison of arrays. The remaining kinds are symbolic sets, kept for membership and streaming (S5); a finite symbolic set is materialized to a Set before it is hashed, compared or stored in a state.

TLC’s representation state that is observable under --compat=tlc is kept out of identity as view bits (flags): a set enumeration that is not yet normalized is a Kind::SetEnum node (flag flags::UNNORM), a record literal is a Fcn with flags::RECORD, and a tuple literal an IntFcn with flags::TUPLE (02-semantic-contract.md C1, C2, C5).

Modules§

flags
View::flags bits. They describe a value’s representation, never its identity: hashing, equality, order and interning ignore them (03-value-model.md §8, §11.5 rule 6).

Structs§

View
A read-only view of a compound, from either region.

Enums§

Kind
The kind of a compound node.