All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gapt.expr.formula.hol.HOLFunction.scala Maven / Gradle / Ivy

The newest version!
package gapt.expr.formula.hol

import gapt.expr.Apps
import gapt.expr.Expr
import gapt.expr.Var
import gapt.expr.formula.NonLogicalConstant
import gapt.expr.ty.To

object HOLFunction {
  def apply(head: Expr, args: List[Expr]): Expr = {
    val res = Apps(head, args)
    require(res.ty != To)
    res
  }
  def unapply(e: Expr): Option[(Expr, List[Expr])] = e match {
    case Apps(head @ (NonLogicalConstant(_, _, _) | Var(_, _)), args) if e.ty != To => Some(head, args)
    case _                                                                          => None
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy