Match a disjunction term of type A1 + A2 + ...
Match a disjunction term of type A1 + A2 + ... + An against a list of n functions. The type of the result of each function must be the same, and will be the type of this term. This represents code of the form
term match { case a1: A1 ⇒ ... case a2: A2 ⇒ ... ... case an: An ⇒ ... }
Term to be matched. Must be of disjunction type.
List of "case functions" of types A1 ⇒ Z, ..., An ⇒ Z. Each "case function" must be a function of the form CurriedE(PropE(_) :: _, _), that is, with at least one argument.
This type expression represents a case class, treated as a named conjunction.
This type expression represents a case class, treated as a named conjunction.
The wrapped
is a type expression for the entire contents of the named conjunction. This can be a Unit, a single type, or a ConjunctT.
If accessors
is empty and wrapped
is Seq(), this is a case object. If accessors
is empty and wrapped
is Seq(UnitT), this is a case class with zero arguments.
If accessors
in not empty, wrapped
could be a ConjunctT with more than one part, or another type (e.g. Int or another NamedConjunctT or whatever else).
Obtain the lambda-term from an enriched expression that results from ofType
.
Obtain the lambda-term from an enriched expression that results from ofType
.
Will throw an exception if the expression is not obtained from ofType
or allOfType
.
Automatically implement an expression of a given type using given values, and return all inequivalent implementations that have the lowest information loss score.
Automatically implement an expression of a given type using given values, and return all inequivalent implementations
that have the lowest information loss score.
The type parameter U
_must_ be specified.
Type of the expression to be implemented.
Zero or more expressions that may be used while implementing the type.
A sequence of all possible inequivalent automatically constructed expressions of type U
.
Automatically implement an expression of a given type, and return all inequivalent implementations that have the lowest information loss score.
Automatically implement an expression of a given type, and return all inequivalent implementations
that have the lowest information loss score.
The type parameter U
_must_ be specified.
Type of the expression to be implemented.
A sequence of all possible inequivalent automatically constructed expressions of type U
.
Automatically implement an expression of a given type using given values, and return all inequivalent implementations regardless of their information loss score.
Automatically implement an expression of a given type using given values, and return all inequivalent implementations
regardless of their information loss score.
The type parameter U
_must_ be specified.
Type of the expression to be implemented.
Zero or more expressions that may be used while implementing the type.
A sequence of all possible inequivalent automatically constructed expressions of type U
.
Create a new fresh variable term of given type.
Create a new fresh variable term of given type.
Type expression that will be assigned to the new variable.
A new variable.
Automatically implement an expression of a given type.
Automatically implement an expression of a given type.
The type parameter U
_does not_ need to be specified.
The required type parameter U
and other available terms and type parameters will be detected automatically from the left-hand side.
Example usage:
def f[A,B](x: A ⇒ B, y: B ⇒ A): A ⇒ A = implement
Type of the expression to be implemented. Specifying this type parameter is optional. If it is not specified, it will be detected automatically by examining the left-hand side of the definition.
An automatically constructed expression of type U
.
Automatically implement an expression of a given type, using given values.
Automatically implement an expression of a given type, using given values.
The type parameter U
_must_ be specified.
Example usage:
val x: A ⇒ B = ... val y: B ⇒ C = ... val z = ofType[A ⇒ C](x, y)
Type of the expression to be implemented.
Available values that can be used while constructing the expression.
An automatically constructed expression of type U
.
Automatically implement an expression of a given type.
Automatically implement an expression of a given type.
The type parameter U
_must_ be specified.
Type of the expression to be implemented.
An automatically constructed expression of type U
.
Construct a lambda-calculus type expression of a specified Scala type.
Construct a lambda-calculus type expression of a specified Scala type.
Example usage:
val tInt = typeExpr[Int] def idAType[A] = typeExpr[A ⇒ A]
The Scala type for which the type expression is requested. Can use type parameters.
A TypeExpr corresponding to the given Scala type.