Primitive Types

This table lists all basic types supported by the MUFL compilation environment.

Type Description Domain
any Represents any value n/a
nil Single value representing Boolean nil NIL
true Single value representing Boolean true TRUE
true+ Single value representing Boolean true or Boolean nil TRUE | NIL
int A 64-bit signed integer value INTEGER
str Variable length ASCII string STRING
bin A value representing a binary blob BINARY
hash Represents a hash code (currently 32 bytes) HASH_CODE
saferef Opaque identifier used as an internal authorization key SAFEREF
time Represents date+time values TIME
crypto Binary representation of cryptographically-relevant data, such as keys

Subtypes:
    secretkey_sign - a private signing key
    publickey_sign - a public signing key
    secretkey_encrypt - a private encryption key
    publickey_encrypt - a public encryption key
    crypto_signature - a cryptographic signature
    crypto_message - an encrypted message
CRYPTO_ELEMENT

Composite Types

This table lists all type expressions available in MUFL contexts where types can be declared.

Type Expression Description Related Topic
type+ Nullable type: type or NIL Nullable Types
type1 || type2 Disjunction: type1 or type2 Disjunction Types
?variable Same type as variable Type-of-Variable Expression
<str1, str2,...> A set of enumerated string values Value Sets
type1->>type2 A map with key of type1 and value of type2 Map
type1->type2 A function with argument type1 and result of type2 Functional Types
type(,) A set of type Set
type[] An integer-subscripted dictionary with values of type Array