Packages

trait LfTypeEncoding extends AnyRef

A backend for accumulating well-typed information about Daml-LF ADTs (records, variants, and templates) into encodings of those ADTs.

While a few of its methods are concrete, implementers of LfTypeEncoding can assume that those implementations are fixed, and should be expressed solely in terms of the abstract methods and types.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. LfTypeEncoding
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. abstract type Field[A]

    A guaranteed-single field encoding.

  2. abstract type Out[A]
  3. abstract type RecordFields[A]

    An encoding for one or more fields, with associated operations for combination.

  4. abstract type VariantCases[A]

Abstract Value Members

  1. abstract val RecordFields: InvariantApply[RecordFields]

    A language for building up record field lists and their associated Outs.

    A language for building up record field lists and their associated Outs. The laws need only hold up to observation by record.

  2. abstract val VariantCases: Plus[VariantCases]

    A language for building up variant case handlers.

  3. abstract def emptyRecord[A](recordId: Identifier, element: () => A): Out[A]

    record produces a non-empty record; alternatively, produce an empty record with this function.

    record produces a non-empty record; alternatively, produce an empty record with this function. Not incorporating an identity in RecordFields to solve this problem significantly simplifies the design of useful RecordFields types.

    element

    A simplification of the arguments to xmap for RecordFields[Unit], which are Unit => A and A => Unit; the latter is always _ => ().

  4. abstract def enumAll[A](enumId: Identifier, index: (A) => Int, cases: OneAnd[Vector, (String, A)]): Out[A]

    Convenient wrapper for enumeration and iterated VariantCase.plus.

  5. abstract def field[A](fieldName: String, o: Out[A]): Field[A]

    Turn a whole value encoding into a single field.

  6. abstract def fields[A](fi: Field[A]): RecordFields[A]

    Pull a single field into the language of field lists.

  7. abstract val primitive: ValuePrimitiveEncoding[Out]

    Base axioms for primitive LF types.

  8. abstract def record[A](recordId: Identifier, fi: RecordFields[A]): Out[A]

    "Finalize" a field set.

  9. abstract def variant[A](variantId: Identifier, cases: VariantCases[A]): Out[A]

    "Finalize" a variant set.

  10. abstract def variantCase[B, A](caseName: String, o: Out[B])(inject: (B) => A)(select: PartialFunction[A, B]): VariantCases[A]

    Pull a variant case into the language of variant cases.

    Pull a variant case into the language of variant cases.

    select

    Must form a prism with inject.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  9. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  10. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  11. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  13. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  14. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  15. def toString(): String
    Definition Classes
    AnyRef → Any
  16. final def variantAll[A](variantId: Identifier, case0: VariantCases[A], cases: VariantCases[A]*): Out[A]

    Convenient wrapper for variant and iterated VariantCase.plus.

  17. final def variantRecordCase[B, A >: B](caseName: String, parentVariantId: Identifier, o: RecordFields[B])(select: PartialFunction[A, B]): VariantCases[A]

    Convenience wrapper of variantCase for a case whose contents are a splatted record.

    Convenience wrapper of variantCase for a case whose contents are a splatted record. In Scala's typical ADT encoding, variant cases are subtypes of the whole variant type; we exploit that.

  18. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  19. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  20. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped