Library MonadVM.Traits

File generated by rocq-of-ocaml
Require Import RocqOfOCaml.RocqOfOCaml.
Require Import RocqOfOCaml.Settings.

Require Import MonadVM.Support.Variants.
Require MonadVM.Support.CryptoBlake2.
Require Import RocqOfOCaml.Opaque.
Local Ltac _rocq_witness_type typ :=
  let typ := eval hnf in typ in
  lazymatch typ with
  | list ?a ⇒ let a := _rocq_witness_type a in constr:(list a)
  | option ?a ⇒ let a := _rocq_witness_type a in constr:(option a)
  | prod ?a ?b ⇒ let a := _rocq_witness_type a in
      let b := _rocq_witness_type b in constr:(prod a b)
  | sum ?a ?b ⇒ let a := _rocq_witness_type a in
      let b := _rocq_witness_type b in constr:(sum a b)
  | ?a → ?b ⇒ let a := _rocq_witness_type a in
      let b := _rocq_witness_type b in constr:(a → b)
  | _ ⇒ typ
  end.
Module Byte_width.
  Module SIG.
    Record signature : Type := {
      byte_width : MonadVM.Support.Variants.ByteWidth.t;
    }.
  End SIG.
  Definition SIG := SIG.signature.

  Module Bytes256.
    Definition byte_width : MonadVM.Support.Variants.ByteWidth.t :=
      MonadVM.Support.Variants.ByteWidth.Fixed 256.

    Definition module :SIG :=
      {|
        SIG.byte_width := byte_width
      |}.
  End Bytes256.
  Definition Bytes256 := Bytes256.module.

  Module Bytes96.
    Definition byte_width : MonadVM.Support.Variants.ByteWidth.t :=
      MonadVM.Support.Variants.ByteWidth.Fixed 96.

    Definition module :SIG :=
      {|
        SIG.byte_width := byte_width
      |}.
  End Bytes96.
  Definition Bytes96 := Bytes96.module.

  Module Bytes64.
    Definition byte_width : MonadVM.Support.Variants.ByteWidth.t :=
      MonadVM.Support.Variants.ByteWidth.Fixed 64.

    Definition module :SIG :=
      {|
        SIG.byte_width := byte_width
      |}.
  End Bytes64.
  Definition Bytes64 := Bytes64.module.

  Module Bytes48.
    Definition byte_width : MonadVM.Support.Variants.ByteWidth.t :=
      MonadVM.Support.Variants.ByteWidth.Fixed 48.

    Definition module :SIG :=
      {|
        SIG.byte_width := byte_width
      |}.
  End Bytes48.
  Definition Bytes48 := Bytes48.module.

  Module Bytes33.
    Definition byte_width : MonadVM.Support.Variants.ByteWidth.t :=
      MonadVM.Support.Variants.ByteWidth.Fixed 33.

    Definition module :SIG :=
      {|
        SIG.byte_width := byte_width
      |}.
  End Bytes33.
  Definition Bytes33 := Bytes33.module.

  Module Bytes32.
    Definition byte_width : MonadVM.Support.Variants.ByteWidth.t :=
      MonadVM.Support.Variants.ByteWidth.Fixed 32.

    Definition module :SIG :=
      {|
        SIG.byte_width := byte_width
      |}.
  End Bytes32.
  Definition Bytes32 := Bytes32.module.

  Module Bytes20.
    Definition byte_width : MonadVM.Support.Variants.ByteWidth.t :=
      MonadVM.Support.Variants.ByteWidth.Fixed 20.

    Definition module :SIG :=
      {|
        SIG.byte_width := byte_width
      |}.
  End Bytes20.
  Definition Bytes20 := Bytes20.module.

  Module Bytes8.
    Definition byte_width : MonadVM.Support.Variants.ByteWidth.t :=
      MonadVM.Support.Variants.ByteWidth.Fixed 8.

    Definition module :SIG :=
      {|
        SIG.byte_width := byte_width
      |}.
  End Bytes8.
  Definition Bytes8 := Bytes8.module.

  Module Bytes4.
    Definition byte_width : MonadVM.Support.Variants.ByteWidth.t :=
      MonadVM.Support.Variants.ByteWidth.Fixed 4.

    Definition module :SIG :=
      {|
        SIG.byte_width := byte_width
      |}.
  End Bytes4.
  Definition Bytes4 := Bytes4.module.

  Module Bytes1.
    Definition byte_width : MonadVM.Support.Variants.ByteWidth.t :=
      MonadVM.Support.Variants.ByteWidth.Fixed 1.

    Definition module :SIG :=
      {|
        SIG.byte_width := byte_width
      |}.
  End Bytes1.
  Definition Bytes1 := Bytes1.module.

  Module _Variable.
    Definition byte_width : MonadVM.Support.Variants.ByteWidth.t :=
      MonadVM.Support.Variants.ByteWidth.VariableWidth.

    Definition module :SIG :=
      {|
        SIG.byte_width := byte_width
      |}.
  End _Variable.
  Definition _Variable := _Variable.module.
End Byte_width.

Module Signedness.
  Module SIG.
    Record signature : Type := {
      signedness : MonadVM.Support.Variants.Signedness.t;
    }.
  End SIG.
  Definition SIG := SIG.signature.

  Module Unsigned.
    Definition signedness : MonadVM.Support.Variants.Signedness.t :=
      MonadVM.Support.Variants.Signedness.Unsigned.

    Definition module :SIG :=
      {|
        SIG.signedness := signedness
      |}.
  End Unsigned.
  Definition Unsigned := Unsigned.module.

  Module Signed.
    Definition signedness : MonadVM.Support.Variants.Signedness.t :=
      MonadVM.Support.Variants.Signedness.Signed.

    Definition module :SIG :=
      {|
        SIG.signedness := signedness
      |}.
  End Signed.
  Definition Signed := Signed.module.
End Signedness.