package protocol_version_header

  1. Overview
  2. Docs

Source file list_with_max_len_intf.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
open! Core

module type Config = sig
  val max_len : int
  val context : Info.t
end

module type S = sig
  type 'a t = private 'a list [@@deriving bin_io, sexp]

  (** [of_list_exn l] raises if [List.length l] is larger than the supplied [max_len]. *)
  val of_list_exn : 'a list -> 'a t

  val max_len : int
end

module type List_with_max_len = sig
  module type Config = Config
  module type S = S

  module Make (Config : Config) : S
end