Mlsem_types.PEnvPrinting environment: the type aliases to fold back when printing a type, so that a type built from type list('a) = … prints as list(int) rather than as its expansion.
The environment is carried as an effect rather than threaded explicitly: register performs an Update, and printing performs a Get. Both are therefore only usable inside a sequential_handler, and raise Effect.Unhandled outside one.
Printing environment: the type aliases to fold back when printing a type, so that a type built from type list('a) = … prints as list(int) rather than as its expansion.
The environment is carried as an effect rather than threaded explicitly: register performs an Update, and printing performs a Get. Both are therefore only usable inside a sequential_handler, and raise Effect.Unhandled outside one.
sequential_handler penv f x runs f x with penv as the ambient printing environment, and returns its result together with the environment as the registrations performed by f left it.
val empty : tAdds the aliases of the second environment to the first, dropping any earlier alias that has the same name or denotes an equivalent type.
Registers a name for a type. Must be called under a sequential_handler.
register_parametrized name args ty registers ty under the display form name(args). Type variables occurring in args are recorded as holes, so that the alias still prints correctly when those variables are renamed at printing time. Must be called under a sequential_handler.
Printer parameters for the ambient environment. Must be called under a sequential_handler.
Like printer_params, for printing types to which the given substitution is applied — the aliases are substituted accordingly.