Declarations

Declarations D add new symbols to the typing environment.

Syntax

Description

Effect on typing environment

extern type Symbol

Extern type

Register Symbol as a new extern type that is either defined in a plugin or treated purely syntactically.

extern val Symbol : T

Extern value

Register Symbol as a new variable that is either defined in a plugin or treated purely syntactically.

val Symbol = E

Expression synonym

Define Symbol as an abbreviation for E; a specific type for the binding is inferred and used at future occurrences.

val Symbol : T = E

Expression synonym

Define Symbol as an abbreviation for E of type T.

context CSymbol

Context ID

Declare a new context ID CSymbol.