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.
- Alphabetic
- By Inheritance
- LfTypeEncoding
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
Abstract Value Members
- 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
. - abstract val VariantCases: Plus[VariantCases]
A language for building up variant case handlers.
- 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 inRecordFields
to solve this problem significantly simplifies the design of usefulRecordFields
types.- element
A simplification of the arguments to
xmap
forRecordFields[Unit]
, which areUnit => A
andA => Unit
; the latter is always_ => ()
.
- abstract def enumAll[A](enumId: Identifier, index: (A) => Int, cases: OneAnd[Vector, (String, A)]): Out[A]
Convenient wrapper for enumeration and iterated
VariantCase.plus
. - abstract def field[A](fieldName: String, o: Out[A]): Field[A]
Turn a whole value encoding into a single field.
- abstract def fields[A](fi: Field[A]): RecordFields[A]
Pull a single field into the language of field lists.
- abstract val primitive: ValuePrimitiveEncoding[Out]
Base axioms for primitive LF types.
- abstract def record[A](recordId: Identifier, fi: RecordFields[A]): Out[A]
"Finalize" a field set.
- abstract def variant[A](variantId: Identifier, cases: VariantCases[A]): Out[A]
"Finalize" a variant set.
- 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
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def variantAll[A](variantId: Identifier, case0: VariantCases[A], cases: VariantCases[A]*): Out[A]
Convenient wrapper for
variant
and iteratedVariantCase.plus
. - 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. - final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated