gapt.expr.VarOrConst.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gapt_3 Show documentation
Show all versions of gapt_3 Show documentation
General Architecture for Proof Theory
The newest version!
package gapt.expr
import gapt.expr.ty.Ty
trait VarOrConst extends Expr {
def name: String
}
/**
* Matches constants and variables, but nothing else.
*/
object VarOrConst {
def unapply(e: VarOrConst): Some[(String, Ty, List[Ty])] =
e match {
case Const(n, t, p) => Some(n, t, p)
case Var(n, t) => Some(n, t, Nil)
}
}