370112f9b8
This patch is co-authored with: cagdas.bozman@ocamlpro.com With this patch the economic protocol is now compiled as as "functor-pack", parameterized over the environment. This will ease the protocol reusability outside of the tezos source tree (e.g. for a michelson Web IDE) and will allow proper unit testing of the economic protocol. This functorization allows to break the dependency of the 'tezos-protocol-compiler' on various '.mli' of the node, and hence we don't need anymore the unusual compilation schema: a.mli -> b.mli -> b.ml -> a.ml where 'A' is linked after 'B' but 'a.mli' should still be compiled before 'b.mli'. This will simplify a switch to 'ocp-build' or 'jbuiler'.
26 lines
703 B
OCaml
26 lines
703 B
OCaml
|
|
module type S = sig
|
|
type t
|
|
val (=) : t -> t -> bool
|
|
val (<>) : t -> t -> bool
|
|
val (<) : t -> t -> bool
|
|
val (<=) : t -> t -> bool
|
|
val (>=) : t -> t -> bool
|
|
val (>) : t -> t -> bool
|
|
val compare : t -> t -> int
|
|
val max : t -> t -> t
|
|
val min : t -> t -> t
|
|
end
|
|
|
|
module Char : S with type t = char
|
|
module Bool : S with type t = bool
|
|
module Int : S with type t = int
|
|
module Int32 : S with type t = int32
|
|
module Uint32 : S with type t = int32
|
|
module Int64 : S with type t = int64
|
|
module Uint64 : S with type t = int64
|
|
module Float : S with type t = float
|
|
module String : S with type t = string
|
|
module List(P : S) : S with type t = P.t list
|
|
module Option(P : S) : S with type t = P.t option
|