Class

io.chymyst.ch

MatchE

Related Doc: package ch

Permalink

final case class MatchE(term: TermExpr, cases: List[TermExpr]) extends TermExpr with Product with Serializable

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

Term to be matched. Must be of disjunction type.

cases

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.

Linear Supertypes
Serializable, Serializable, Product, Equals, TermExpr, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MatchE
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. TermExpr
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MatchE(term: TermExpr, cases: List[TermExpr])

    Permalink

    term

    Term to be matched. Must be of disjunction type.

    cases

    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.

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def :@(terms: TermExpr*): TermExpr

    Permalink

    Provide :@ syntax for term application with automatic alpha-conversion for type variables in the function head.

    Provide :@ syntax for term application with automatic alpha-conversion for type variables in the function head.

    Definition Classes
    TermExpr
  4. def :@@(otherTerm: TermExpr): TermExpr

    Permalink
    Definition Classes
    TermExpr
  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. def =>:(y: VarE): TermExpr

    Permalink
    Definition Classes
    TermExpr
  7. def @@:(otherTerm: TermExpr): TermExpr

    Permalink
    Definition Classes
    TermExpr
  8. def andThen(otherTerm: TermExpr): TermExpr

    Permalink

    Provide syntax for function composition.

    Provide syntax for function composition.

    Definition Classes
    TermExpr
  9. def apply(terms: TermExpr*): TermExpr

    Permalink
    Definition Classes
    TermExpr
  10. def apply(acc: String): TermExpr

    Permalink
    Definition Classes
    TermExpr
  11. def apply(i: Int): TermExpr

    Permalink
    Definition Classes
    TermExpr
  12. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  13. def cases(cases: TermExpr*): TermExpr

    Permalink
    Definition Classes
    TermExpr
  14. val cases: List[TermExpr]

    Permalink

    List of "case functions" of types A1 ⇒ Z, ..., An ⇒ Z.

    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.

  15. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  16. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  17. def equiv(y: TermExpr): Boolean

    Permalink
    Definition Classes
    TermExpr
  18. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. lazy val freeVarNames: Seq[String]

    Permalink
    Definition Classes
    TermExpr
  20. lazy val freeVars: Set[VarE]

    Permalink
    Definition Classes
    TermExpr
  21. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  22. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  23. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  24. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. lazy val prettyPrint: String

    Permalink
    Definition Classes
    TermExpr
  27. lazy val prettyRename: TermExpr

    Permalink
    Definition Classes
    TermExpr
  28. lazy val prettyRenamePrint: String

    Permalink
    Definition Classes
    TermExpr
  29. def renameAllVars(oldAndNewNames: Map[String, String]): TermExpr

    Permalink
    Definition Classes
    TermExpr
  30. def renameAllVars(oldNames: Seq[String], newNames: Seq[String]): TermExpr

    Permalink
    Definition Classes
    TermExpr
  31. lazy val simplify: TermExpr

    Permalink
    Definition Classes
    TermExpr
  32. def substTypeVar(from: TermExpr, to: TermExpr): TermExpr

    Permalink
    Definition Classes
    TermExpr
  33. def substTypeVars(substitutions: Map[TP, TypeExpr]): TermExpr

    Permalink
    Definition Classes
    TermExpr
  34. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  35. lazy val t: TypeExpr

    Permalink
    Definition Classes
    MatchETermExpr
  36. val term: TermExpr

    Permalink

    Term to be matched.

    Term to be matched. Must be of disjunction type.

  37. lazy val toString: String

    Permalink
    Definition Classes
    TermExpr → AnyRef → Any
  38. lazy val usedVarNames: Seq[String]

    Permalink
    Definition Classes
    TermExpr
  39. def varCount(varName: String): Int

    Permalink
    Definition Classes
    TermExpr
  40. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  41. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from TermExpr

Inherited from AnyRef

Inherited from Any

Ungrouped