preExpr

gapt.expr.preExpr
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:

  1. There are type meta-variables.
  2. There are type annotations.
  3. Free variables, bound variables, and constants are not distinguished; they are all stored as "identifiers".

Attributes

Source
preExpr.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
preExpr.type

Members list

Type members

Classlikes

case class Abs(v: Ident, sub: Expr) extends Expr

Attributes

Source
preExpr.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Expr
class Object
trait Matchable
class Any
Show all
case class App(a: Expr, b: Expr) extends Expr

Attributes

Source
preExpr.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Expr
class Object
trait Matchable
class Any
Show all
case class ArrType(a: Type, b: Type) extends Type

Attributes

Source
preExpr.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Type
class Object
trait Matchable
class Any
Show all
case class BaseType(name: String, params: List[Type]) extends Type

Attributes

Source
preExpr.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Type
class Object
trait Matchable
class Any
Show all
case class ElabError(loc: Option[Location], msg: String, expected: Option[Type], actual: Option[Type], assg: ElabState)

Attributes

Companion
object
Source
preExpr.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object ElabError

Attributes

Companion
class
Source
preExpr.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
ElabError.type
sealed trait Expr

Attributes

Source
preExpr.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Abs
class App
class FlatOps
class Ident
class Quoted
Show all
case class FlatOps(children: List[FlatOpsChild]) extends Expr

Attributes

Source
preExpr.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Expr
class Object
trait Matchable
class Any
Show all
case class Ident(name: String, ty: Type, params: Option[List[Type]]) extends Expr

Attributes

Source
preExpr.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Expr
class Object
trait Matchable
class Any
Show all
case class LocAnnotation(expr: Expr, loc: Location) extends Expr

Attributes

Source
preExpr.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Expr
class Object
trait Matchable
class Any
Show all
case class Location(begin: Int, end: Int)

Attributes

Source
preExpr.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class MetaType(idx: MetaTypeIdx) extends Type

Attributes

Source
preExpr.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Type
class Object
trait Matchable
class Any
Show all
class MetaTypeIdx

Attributes

Source
preExpr.scala
Supertypes
class Object
trait Matchable
class Any
case class Mismatch(t1: Type, t2: Type, assg: Assg) extends UnificationError

Attributes

Source
preExpr.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class OccursCheck(t1: MetaType, t2: Type, assg: Assg) extends UnificationError

Attributes

Source
preExpr.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class Quoted(e: Expr, ty: Type, fvs: Map[String, Type]) extends Expr

Attributes

Source
preExpr.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Expr
class Object
trait Matchable
class Any
Show all

Attributes

Source
preExpr.scala
Supertypes
class Object
trait Matchable
class Any
sealed trait Type

Attributes

Source
preExpr.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class ArrType
class BaseType
class MetaType
class VarType
case class TypeAnnotation(expr: Expr, ty: Type) extends Expr

Attributes

Source
preExpr.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Expr
class Object
trait Matchable
class Any
Show all
sealed trait UnificationError

Attributes

Source
preExpr.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Mismatch
class OccursCheck
case class VarType(name: String) extends Type

Attributes

Source
preExpr.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Type
class Object
trait Matchable
class Any
Show all

Types

Attributes

Source
preExpr.scala
type Elab[X] = StateT[ElabResult, ElabState, X]

Attributes

Source
preExpr.scala
type ElabResult[X] = Either[ElabError, X]

Attributes

Source
preExpr.scala

Attributes

Source
preExpr.scala
type Env = Map[String, Type]

Attributes

Source
preExpr.scala

Attributes

Source
preExpr.scala

Value members

Concrete methods

def All: (Ident, Expr) => Expr

Attributes

Source
preExpr.scala
def And: (Expr, Expr) => Expr

Attributes

Source
preExpr.scala

Attributes

Source
preExpr.scala
def Bool: BaseType

Attributes

Source
preExpr.scala
def Bottom: Quoted

Attributes

Source
preExpr.scala
def Eq(a: Expr, b: Expr): App

Attributes

Source
preExpr.scala
def Ex: (Ident, Expr) => Expr

Attributes

Source
preExpr.scala
def Iff(a: Expr, b: Expr): Expr

Attributes

Source
preExpr.scala
def Imp: (Expr, Expr) => Expr

Attributes

Source
preExpr.scala
def Neg: Expr => Expr

Attributes

Source
preExpr.scala
def Or: (Expr, Expr) => Expr

Attributes

Source
preExpr.scala
def Quant(name: String): (Ident, Expr) => Expr

Attributes

Source
preExpr.scala

Attributes

Source
preExpr.scala

Attributes

Source
preExpr.scala
def Top: Quoted

Attributes

Source
preExpr.scala

Attributes

Source
preExpr.scala
def elabError[T](msg: String, atExpr: Expr)(implicit loc: Option[Location]): Elab[T]

Attributes

Source
preExpr.scala
def elabError[T](msg: String)(implicit loc: Option[Location]): Elab[T]

Attributes

Source
preExpr.scala
def elabIdent(e: Expr)(implicit loc: Option[Location]): Elab[Ident]

Attributes

Source
preExpr.scala
def elabIdent(ch: FlatOpsChild)(implicit loc: Option[Location]): Elab[Ident]

Attributes

Source
preExpr.scala
def freeIdentifers(expr: Expr): Set[String]

Attributes

Source
preExpr.scala

Attributes

Source
preExpr.scala

Attributes

Source
preExpr.scala
def infer(expr: Expr, env: Env)(implicit loc: Option[Location], sig: BabelSignature): Elab[(Expr, Type)]

Attributes

Source
preExpr.scala
def infers(exprs: Seq[Expr], env: Env)(implicit loc: Option[Location], sig: BabelSignature): Elab[List[(Expr, Type)]]

Attributes

Source
preExpr.scala
def liftTypeMono(t: Ty): Type

Attributes

Source
preExpr.scala
def liftTypePoly(t: Ty, ps: List[Ty]): (Type, List[Type])

Attributes

Source
preExpr.scala
def locOf(expr: Expr): Option[Location]

Attributes

Source
preExpr.scala
def locsOf(exprs: Seq[Expr]): Option[Location]

Attributes

Source
preExpr.scala
def mkBinOp(c: ConstName, fn: Option[Expr], arg1: Expr, arg2: Expr): Expr

Attributes

Source
preExpr.scala
def parseFlatOpFirst(flatOpsChildren: List[FlatOpsChild], env: Env, minPrec: Int)(implicit loc: Option[Location], sig: BabelSignature): Elab[(Expr, List[FlatOpsChild])]

Attributes

Source
preExpr.scala
def parseFlatOpRest(flatOpsChildren: List[FlatOpsChild], lhsExpr: Expr, env: Env, minPrec: Int)(implicit loc: Option[Location], sig: BabelSignature): Elab[(Expr, List[FlatOpsChild])]

Attributes

Source
preExpr.scala

Attributes

Source
preExpr.scala
def subst(t: Type, assg: Map[MetaTypeIdx, Type]): Type

Attributes

Source
preExpr.scala
def toRealExpr(expr: Expr, assg: Map[MetaTypeIdx, Type], bound: Set[String]): Expr

Attributes

Source
preExpr.scala

Attributes

Source
preExpr.scala

Attributes

Source
preExpr.scala
def toRealType(ty: Type, assg: Map[MetaTypeIdx, Type]): Ty

Attributes

Source
preExpr.scala
def typeVars(t: Type): Set[String]

Attributes

Source
preExpr.scala
def types(expr: Expr): Set[Type]

Attributes

Source
preExpr.scala
def unify(a: Type, b: Type, mkErr: UnificationError => ElabError): Elab[Unit]

Attributes

Source
preExpr.scala
def unifys(as: List[Type], bs: List[Type], mkErr: UnificationError => ElabError): Elab[Unit]

Attributes

Source
preExpr.scala