Function buildTypeclassLaws

Build typeclass laws for the given instances of some datatype.

harness

contravariant: (<F>(given: ContravariantGiven<F>) => (<Ins>(instances: Ins) => LawSet[]))

Type declaration

    • <F>(given): (<Ins>(instances: Ins) => LawSet[])
    • Build typeclass laws for the given instances of some contravariant datatype: a higher-kinded datatype where the constructor type parameter appears in the contravariant position, for example Predicate. The underlying types used will all be readonly number[]. This is a version of buildTypeclassLaws for contravariant datatypes.

      Type Parameters

      • F extends TypeLambda

      Parameters

      Returns (<Ins>(instances: Ins) => LawSet[])

        • <Ins>(instances): LawSet[]
        • Type Parameters

          Parameters

          • instances: Ins

            Instances to test. Key is typeclass name and value is the instance under test. For example, { Invariant: Predicate.Invariant } will run the Invariant typeclass laws on the datatype Predicate.

          Returns LawSet[]