object preExpr
Intermediate representation for expressions without explicit types.
The main application is during parsing: the gapt.formats.babel.BabelParser produces pre-expressions.
This representation is intended to be as simple as possible, all higher-level constructs (such as <-> or ∀) are already desugared into simply-typed lambda terms.
It differs from the "real" lambda calculus in gapt.expr in three major ways:
- There are type meta-variables.
- There are type annotations.
- Free variables, bound variables, and constants are not distinguished; they are all stored as "identifiers".
- Source
- preExpr.scala
Linear Supertypes
Content Hierarchy
Ordering
- Alphabetic
- By Inheritance
Inherited
- preExpr
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Type Members
- case class Abs(v: Ident, sub: Expr) extends Expr with Product with Serializable
- case class App(a: Expr, b: Expr) extends Expr with Product with Serializable
- case class ArrType(a: Type, b: Type) extends Type with Product with Serializable
- type Assg = Map[MetaTypeIdx, Type]
- case class BaseType(name: String, params: List[Type]) extends Type with Product with Serializable
- type Elab[X] = IndexedStateT[ElabResult, ElabState, ElabState, X]
- case class ElabError(loc: Option[Location], msg: String, expected: Option[Type], actual: Option[Type], assg: ElabState) extends Product with Serializable
- type ElabResult[X] = Either[ElabError, X]
- type ElabState = Map[MetaTypeIdx, Type]
- type Env = Map[String, Type]
- sealed trait Expr extends AnyRef
- case class FlatOps(children: List[FlatOpsChild]) extends Expr with Product with Serializable
- type FlatOpsChild = Either[(String, Location), Expr]
- case class Ident(name: String, ty: Type, params: Option[List[Type]]) extends Expr with Product with Serializable
- case class LocAnnotation(expr: Expr, loc: Location) extends Expr with Product with Serializable
- case class Location(begin: Int, end: Int) extends Product with Serializable
- case class MetaType(idx: MetaTypeIdx) extends Type with Product with Serializable
- class MetaTypeIdx extends AnyRef
- case class Mismatch(t1: Type, t2: Type, assg: Assg) extends UnificationError with Product with Serializable
- case class OccursCheck(t1: MetaType, t2: Type, assg: Assg) extends UnificationError with Product with Serializable
- case class Quoted(e: expr.Expr, ty: Type, fvs: Map[String, Type]) extends Expr with Product with Serializable
- class ReadablePrinter extends AnyRef
- sealed trait Type extends AnyRef
- case class TypeAnnotation(expr: Expr, ty: Type) extends Expr with Product with Serializable
- sealed trait UnificationError extends AnyRef
- case class VarType(name: String) extends Type with Product with Serializable
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def All: (Ident, Expr) => Expr
- def And: (Expr, Expr) => Expr
- def BinaryConn(c: MonomorphicLogicalC): (Expr, Expr) => Expr
- def Bool: BaseType
- def Bottom: Quoted
- def Eq(a: Expr, b: Expr): App
- def Ex: (Ident, Expr) => Expr
- def Iff(a: Expr, b: Expr): Expr
- def Imp: (Expr, Expr) => Expr
- def Neg: (Expr) => Expr
- def Or: (Expr, Expr) => Expr
- def Quant(name: String): (Ident, Expr) => Expr
- def QuoteBlackbox(e: expr.Expr): Quoted
- def QuoteWhitebox(e: expr.Expr): Quoted
- def Top: Quoted
- def UnaryConn(c: MonomorphicLogicalC): (Expr) => Expr
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- def elabError[T](msg: String)(implicit loc: Option[Location]): Elab[T]
- def elabError[T](msg: String, atExpr: Expr)(implicit loc: Option[Location]): Elab[T]
- def elabIdent(ch: FlatOpsChild)(implicit loc: Option[Location]): Elab[Ident]
- def elabIdent(e: Expr)(implicit loc: Option[Location]): Elab[Ident]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def freeIdentifers(expr: Expr): Set[String]
- def freeMetas(t: Type): Set[MetaTypeIdx]
- def freshMetaType(): MetaType
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def infer(expr: Expr, env: Env)(implicit loc: Option[Location], sig: BabelSignature): Elab[(Expr, Type)]
- def infers(exprs: Seq[Expr], env: Env)(implicit loc: Option[Location], sig: BabelSignature): Elab[List[(Expr, Type)]]
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def liftTypeMono(t: Ty): Type
- def liftTypePoly(t: Ty, ps: List[Ty]): (Type, List[Type])
- def locOf(expr: Expr): Option[Location]
- def locsOf(exprs: Seq[Expr]): Option[Location]
- def mkBinOp(c: ConstName, fn: Option[Expr], arg1: Expr, arg2: Expr): Expr
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- def parseFlatOpFirst(flatOpsChildren: List[FlatOpsChild], env: Env, minPrec: Int)(implicit loc: Option[Location], sig: BabelSignature): Elab[(Expr, List[FlatOpsChild])]
- def parseFlatOpRest(flatOpsChildren: List[FlatOpsChild], lhsExpr: Expr, env: Env, minPrec: Int)(implicit loc: Option[Location], sig: BabelSignature): Elab[(Expr, List[FlatOpsChild])]
- def solve(eqs: List[(Type, Type)], assg: Map[MetaTypeIdx, Type]): Either[UnificationError, Assg]
- def subst(t: Type, assg: Map[MetaTypeIdx, Type]): Type
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toRealExpr(expr: Expr, sig: BabelSignature): Either[ElabError, expr.Expr]
- def toRealExpr(expr: Expr, assg: Map[MetaTypeIdx, Type], bound: Set[String]): expr.Expr
- def toRealExprs(expr: Seq[Expr], sig: BabelSignature): Either[ElabError, Seq[expr.Expr]]
- def toRealType(ty: Type, assg: Map[MetaTypeIdx, Type]): Ty
- def toString(): String
- Definition Classes
- AnyRef → Any
- def typeVars(t: Type): Set[String]
- def types(expr: Expr): Set[Type]
- def unify(a: Type, b: Type, mkErr: (UnificationError) => ElabError): Elab[Unit]
- def unifys(as: List[Type], bs: List[Type], mkErr: (UnificationError) => ElabError): Elab[Unit]
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- object ElabError extends Serializable
This is the API documentation for GAPT.
The main package is gapt.