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. Protected

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[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  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. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  21. def getIdentShowMode(expr: VarOrConst, knownType: Boolean, bound: Map[String, Var], t0: Map[String, VarOrConst]): (IdentShowMode, Map[String, VarOrConst])
  22. def group(doc: Doc): Doc
    Attributes
    protected
  23. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  24. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  25. val lineWidth: Int
  26. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  27. def nest(doc: Doc, j: Int = defaultIndent): Doc
  28. def notationForConst(const: ConstName): Option[Notation]
  29. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  30. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  31. def paramsNecessary(sigC: Const): Boolean
  32. def parens(doc: Doc): Doc
    Attributes
    protected
  33. val safeChars: Regex
  34. def safeMatching(c1: Const, c2: Const): Option[Substitution]
  35. def safeMatching(c1: Const, c2: Expr): Option[Substitution]
  36. def sepByComma(args: List[Doc]): Doc
  37. def show(ty: Ty, needParens: Boolean): Doc
  38. def show(ident: VarOrConst, mode: IdentShowMode): Parenable
  39. 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.

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

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated
  2. 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
    @deprecated @inline()
    Deprecated

    (Since version 2.12.16) Use formatString.format(value) instead of value.formatted(formatString), or use the f"" string interpolator. In Java 15 and later, formatted resolves to the new method in String which has reversed parameters.

  3. 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