cast v0.1.0 Cast.DSL
Provides DSL for importing Cast types
Link to this section Summary
Link to this section Functions
Declares a constant
Arguments:
name: name of the constant in the ASTopts: keyword listname: valid function name: if constant name is not a valid function name, this option gives the name of the function to generate (default: constant name as in AST)cast: a function to cast (charlist) value into desired one (default:& &1)
Generates a function to access value.
Declares an enumeration module
Arguments
name: name of the generated moduleopts: keyword list, one of:contains: one of the value of the enumeration to extract (for anonymous enumerations)name: name of the enumeration
Generates a module with following functions:
mapping/0: returns a%{atom => integer}mapkey/1: returns the atom key for a given integer. Raise if invalid value.value/1: returns the integer value for a given atom key. Raise if invalid key.