Directives

There are a couple of compiler directives like #line or _pragma_ that affect the way the compilation is done. A full list is here.

Standard and strict typing mode

Mix is a typed language, but with a various degree of strictness. By default it is non-strict:

In strict mode (since PR#892):

You can select strict mode with

_pragma_ {strictTyping:true}

at the beginning of a module.

Meta data

Modules, functions and cells can be annotated with meta data. The key word _meta_ is followed by a constant JSON expression - which is by convention always an object:

module M _meta_ { ... }        // module with meta data
def f : t _meta_ { ... }       // function signature with meta data
cell c : t _meta_ { ... }      // cell signature with meta data

Deprecation

The form is:

_meta_ { deprecated:true, expires: "yyyy-mm-dd", alternatives: [ "alt1", "alt2", ... ] }

Renaming

The form is:

_meta_ { renamed:true, expires: "yyyy-mm-dd", replacement: "newname" }

Module type