Auras are types of atoms. A generic atom (@) is a non-negative decimal integer. Auras allow such atoms to be defined more specifically, such as @t for little-endian UTF-8 strings, @ux for hexadecimal and @p for a ship name like ~sampel-palnet. Auras do three things:
- Define type nesting logic, such that
@tasnests under@,@t, and@tabut not@p. - Let the pretty-printer know how to print the values, so a
@tlike'foo'prints as'foo'rather than7.303.014. - Define literal syntaxes for the various auras, so the parser/compiler can understand them.
Note that auras do not enforce the validity of an encoding scheme, so you can type-cast the @t '!!!' to @ta despite ! not being allowed in an @ta literal. They are ultimately just metadata given to compiler.
Further reading
- Aura reference: Additional information about auras.
- Hoon School: syntax lesson: Includes details of atoms and auras.