Expression#

class Expression(*args, **kwargs)[source]#

Bases: Object

Abstract base class for expressions.

An Expression can be either a Type or a Term.

Parameters:
  • args – Arguments

  • kwargs – Annotations.

Returns:

Expression.

Unfolded args#

Expression.unfolded_args

Expression arguments unfolded.

Expression.get_unfolded_args()

Gets the expression arguments unfolded.

Type constructors#

Expression.type_constructors

Set of type constructors occurring in expression.

Expression.get_type_constructors()

Gets the set of type constructors occurring in expression.

Expression.has_type_constructors()

Tests whether some type constructor occurs in expression.

Type variables#

Expression.type_variables

Set of type variables occurring in expression.

Expression.get_type_variables()

Gets the set of type variables occurring in expression.

Expression.has_type_variables()

Tests whether some type variable occurs in expression.

Instantiation#

Expression.instantiate(theta)

Applies type-variable instantiation theta to expression.