Synopsis A Symbol represents a Rascal Type.
data Symbol
     = \int()
     | \bool()
     | \real()
     | \rat()
     | \str()
     | \num()
     | \node()
     | \void()
     | \value()
     | \loc()
     | \datetime()
data Symbol                            // Labels
     = \label(str name, Symbol symbol)
data Symbol                            // Composite types.
     = \set(Symbol symbol)
     | \rel(list[Symbol] symbols)
     | \lrel(list[Symbol] symbols)
     | \tuple(list[Symbol] symbols)
     | \list(Symbol symbol)
     | \map(Symbol from, Symbol to)
     | \bag(Symbol symbol)
     | \adt(str name, list[Symbol] parameters)
     | \cons(Symbol \adt, str name, list[Symbol] parameters)
     | \alias(str name, list[Symbol] parameters, Symbol aliased)
     | \func(Symbol ret, list[Symbol] parameters)
     | \var-func(Symbol ret, list[Symbol] parameters, Symbol varArg)
     | \reified(Symbol symbol)
data Symbol
     = \parameter(str name, Symbol bound) // Parameter
Usage import Type;
Description Symbols are values that represent Rascal's types. These are the atomic types. We define:
  • Atomic types.
  • Labels that are used to give names to symbols, such as field names, constructor names, etc.
  • Composite types.
  • Parameters that represent a type variable.
Is this page unclear, or have you spotted an error? Please add a comment below and help us to improve it. For all other questions and remarks, visit