Entity / foldkit-entity/conformance

LawsVerdict

const · packages/entity/src/conformance/operator.ts:61

const LawsVerdict: Data.TaggedEnum.Constructor<
  | { readonly _tag: 'Holds'; readonly evidence: ReadonlyArray<TestedEvidence> }
  | {
      readonly _tag: 'Unanswered'
      readonly law: LawDescription
      readonly reason: string
    }
  | {
      readonly _tag: 'Counterexample'
      readonly law: LawDescription
      readonly args: ReadonlyArray<unknown>
      readonly collation: Option.Option<Collation>
      readonly left: Outcome
      readonly right: Outcome
    }
>

Its type

type LawsVerdict = Data.TaggedEnum<{
  Holds: {
    readonly evidence: ReadonlyArray<TestedEvidence>
  }
  Unanswered: {
    readonly law: LawDescription
    readonly reason: string
  }
  Counterexample: {
    readonly law: LawDescription
    readonly args: ReadonlyArray<unknown>
    readonly collation: Option.Option<Collation>
    readonly left: Outcome
    readonly right: Outcome
  }
}>

What Conformance.laws found: every law held, with the evidence; the first case one did not; or a law no case of which both sides answered, which shows nothing of it.