BabelExporter

gapt.formats.babel.BabelExporter
class BabelExporter(unicode: Boolean, sig: BabelSignature, omitTypes: Boolean)

Exports lambda expressions in the Babel format. You probably do not want to use this class, use one of expression.toString, .toSigRelativeString, or .toAsciiString instead. These are all implemented using this class.

Value parameters

sig

The Babel signature, to decide whether we need to escape constants because they do not fit the naming convention.

unicode

Whether to output logical connectives using Unicode symbols.

Attributes

Source
export.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Type members

Classlikes

case object Bare extends IdentShowMode

Attributes

Source
export.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
Bare.type
sealed trait IdentShowMode

Attributes

Source
export.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Bare.type
object Safe.type
object WithParams.type
object WithType.type
case class Parenable(prec: Int, doc: Doc)

Attributes

Source
export.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case object Safe extends IdentShowMode

Attributes

Source
export.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
Safe.type
case object WithParams extends IdentShowMode

Attributes

Source
export.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
WithParams.type
case object WithType extends IdentShowMode

Attributes

Source
export.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
WithType.type

Value members

Concrete methods

def export(expr: Expr): String

Attributes

Source
export.scala
def export(sequent: HOLSequent): String

Attributes

Source
export.scala
def export(ty: Ty): String

Attributes

Source
export.scala
def exportRaw(expr: Expr): String

Attributes

Source
export.scala

Attributes

Source
export.scala
def nest(doc: Doc, j: Int): Doc

Attributes

Source
export.scala

Attributes

Source
export.scala

Attributes

Source
export.scala

Attributes

Source
export.scala

Attributes

Source
export.scala
def sepByComma(args: List[Doc]): Doc

Attributes

Source
export.scala
def show(sequent: HOLSequent, bound: Map[String, Var], t0: Map[String, VarOrConst]): (Doc, Map[String, VarOrConst])

Attributes

Source
export.scala
def show(expr: Expr, knownType: Boolean, bound: Map[String, Var], t0: Map[String, VarOrConst]): (Parenable, Map[String, VarOrConst])

Converts a lambda expression into a document.

Converts a lambda expression into a document.

At every point in the conversion, we keep track of:

  1. Whether the parser will already know the type of this expression (by inference)
  2. What type the free identifiers have.
  3. What priority the enclosing operator has.

Value parameters

bound

Names bound by enclosing binders.

expr

The lambda expression to convert.

knownType

Whether we already know the type of this expression.

t0

Already known free identifiers, together with the variable or constant they represent.

Attributes

Returns

Pretty-printed document and the free identifiers.

Source
export.scala
def show(ident: VarOrConst, mode: IdentShowMode): Parenable

Attributes

Source
export.scala
def show(ty: Ty, needParens: Boolean): Doc

Attributes

Source
export.scala
def showApps(expr: Expr, knownType: Boolean, bound: Map[String, Var], t0: Map[String, VarOrConst]): (Parenable, Map[String, VarOrConst])

Attributes

Source
export.scala
def showFakeBin(expr: Expr, fakeConst: ConstName, a: Expr, b: Expr, knownType: Boolean, bound: Map[String, Var], t0: Map[String, VarOrConst]): (Parenable, Map[String, VarOrConst])

Attributes

Source
export.scala
def showName(token: Token)(implicit dummyImplicit: DummyImplicit): Doc

Attributes

Source
export.scala
def showName(name: String): Doc

Attributes

Source
export.scala

Attributes

Source
export.scala
def showNameWithParams(name: String, params: List[Ty]): Doc

Attributes

Source
export.scala
def showNonOpName(name: String): Doc

Attributes

Source
export.scala
def showRaw(expr: Expr): Parenable

Attributes

Source
export.scala
def showTyParams(params: List[Ty], always: Boolean): Doc

Attributes

Source
export.scala
def shows(exprs: List[Expr], knownType: Boolean, bound: Map[String, Var], t0: Map[String, VarOrConst]): (List[Parenable], Map[String, VarOrConst])

Attributes

Source
export.scala

Attributes

Source
export.scala

Concrete fields

Attributes

Source
export.scala

Attributes

Source
export.scala
val lineWidth: Int

Attributes

Source
export.scala

Attributes

Source
export.scala