Chapter 10. Defining Facets
Facet definitions nearly always take one of two forms: (i) item declarations or (ii) direct definitions. Item declarations use the same form as used with other Rosetta items. Specifically, a label, type, and value are used to create an item declaration of the form:
f ::T is v
where f names the new facet, T is the facet’s type, and v is the facet’s value. This style is used frequently when the value of a facet is calculated from other facets using the facet algebra or when defining a facet variable whose value is unknown.
Like functions, this definition style can be cumbersome and difficult to read in many circumstances. Thus, a special syntax is provided to define facets directly. Called direct definition, this syntax ...