Packages

c

gapt.formats.babel

BabelExporter

class BabelExporter extends AnyRef

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.

Source
export.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BabelExporter
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new BabelExporter(unicode: Boolean, sig: BabelSignature, omitTypes: Boolean = false)

    unicode

    Whether to output logical connectives using Unicode symbols.

    sig

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

Type Members

  1. sealed trait IdentShowMode extends AnyRef
  2. case class Parenable(prec: Int, doc: Doc) extends Product with Serializable

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from BabelExporter toany2stringadd[BabelExporter] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (BabelExporter, B)
    Implicit
    This member is added by an implicit conversion from BabelExporter toArrowAssoc[BabelExporter] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. val asciiUnquotName: Regex
  8. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  9. val defaultIndent: Int
  10. def ensuring(cond: (BabelExporter) => Boolean, msg: => Any): BabelExporter
    Implicit
    This member is added by an implicit conversion from BabelExporter toEnsuring[BabelExporter] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: (BabelExporter) => Boolean): BabelExporter
    Implicit
    This member is added by an implicit conversion from BabelExporter toEnsuring[BabelExporter] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: Boolean, msg: => Any): BabelExporter
    Implicit
    This member is added by an implicit conversion from BabelExporter toEnsuring[BabelExporter] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. def ensuring(cond: Boolean): BabelExporter
    Implicit
    This member is added by an implicit conversion from BabelExporter toEnsuring[BabelExporter] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  16. def export(ty: Ty): String
  17. def export(sequent: HOLSequent): String
  18. def export(expr: Expr): String
  19. def exportRaw(expr: Expr): String
  20. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  21. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from BabelExporter toStringFormat[BabelExporter] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  22. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  23. def getIdentShowMode(expr: VarOrConst, knownType: Boolean, bound: Map[String, Var], t0: Map[String, VarOrConst]): (IdentShowMode, Map[String, VarOrConst])
  24. def group(doc: Doc): Doc
    Attributes
    protected
  25. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  26. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  27. val lineWidth: Int
  28. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  29. def nest(doc: Doc, j: Int = defaultIndent): Doc
  30. def notationForConst(const: ConstName): Option[Notation]
  31. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  32. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  33. def paramsNecessary(sigC: Const): Boolean
  34. def parens(doc: Doc): Doc
    Attributes
    protected
  35. val safeChars: Regex
  36. def safeMatching(c1: Const, c2: Const): Option[Substitution]
  37. def safeMatching(c1: Const, c2: Expr): Option[Substitution]
  38. def sepByComma(args: List[Doc]): Doc
  39. def show(ty: Ty, needParens: Boolean): Doc
  40. def show(ident: VarOrConst, mode: IdentShowMode): Parenable
  41. 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.
    expr

    The lambda expression to convert.

    knownType

    Whether we already know the type of this expression.

    bound

    Names bound by enclosing binders.

    t0

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

    returns

    Pretty-printed document and the free identifiers.

  42. def show(sequent: HOLSequent, bound: Map[String, Var], t0: Map[String, VarOrConst]): (Doc, Map[String, VarOrConst])
  43. def showApps(expr: Expr, knownType: Boolean, bound: Map[String, Var], t0: Map[String, VarOrConst]): (Parenable, Map[String, VarOrConst])
  44. def showFakeBin(expr: Expr, fakeConst: ConstName, a: Expr, b: Expr, knownType: Boolean, bound: Map[String, Var], t0: Map[String, VarOrConst]): (Parenable, Map[String, VarOrConst])
  45. def showName(name: String): Doc
  46. def showName(token: Token)(implicit dummyImplicit: DummyImplicit): Doc
  47. def showNameFollowableByOp(name: String): Doc
  48. def showNameWithParams(name: String, params: List[Ty]): Doc
  49. def showNonOpName(name: String): Doc
  50. def showRaw(expr: Expr): Parenable
  51. def showTyParams(params: List[Ty], always: Boolean = false): Doc
  52. def shows(exprs: List[Expr], knownType: Boolean, bound: Map[String, Var], t0: Map[String, VarOrConst]): (List[Parenable], Map[String, VarOrConst])
  53. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  54. def toString(): String
    Definition Classes
    AnyRef → Any
  55. def unicodeSafe(n: Token): Boolean
  56. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  57. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  58. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  59. object Bare extends IdentShowMode with Product with Serializable
  60. object Safe extends IdentShowMode with Product with Serializable
  61. object WithParams extends IdentShowMode with Product with Serializable
  62. object WithType extends IdentShowMode with Product with Serializable

Deprecated Value Members

  1. def [B](y: B): (BabelExporter, B)
    Implicit
    This member is added by an implicit conversion from BabelExporter toArrowAssoc[BabelExporter] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use -> instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd fromBabelExporter to any2stringadd[BabelExporter]

Inherited by implicit conversion StringFormat fromBabelExporter to StringFormat[BabelExporter]

Inherited by implicit conversion Ensuring fromBabelExporter to Ensuring[BabelExporter]

Inherited by implicit conversion ArrowAssoc fromBabelExporter to ArrowAssoc[BabelExporter]

Ungrouped