PreviousUpNext

10.4.5  upper-case identifiers

Mythryl uses upper-case identifiers to name enum constants / sumtype constructors:

    Color = RED | GREEN | BLUE;
    Tree = PAIR (Tree, Tree) | NODE String;

Their syntax is:

    [A-Z][A-Z'_0-9]*[A-Z][A-Z'_0-9]*

An upper-case identifier should normally consist of one or more underbar-separated words:

    RED
    DEEP_RED

The list-forming operator ’!’ is an honorary upper-case identifier. It is the only sumtype constructor which is not alphabetic.


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext