Commit de36fb96 authored by Stephane Glondu's avatar Stephane Glondu
Browse files

Move ELECTION_BUNDLE to Web_signatures and drop BALLOT_BOX_BUNDLE

parent 71a095c1
......@@ -214,23 +214,3 @@ module type ELECTION = sig
val extract_tally : result -> plaintext
(** Extract the plaintext result of the election. *)
end
module type ELECTION_BUNDLE = sig
(* It seems that with OCaml 3.12.1, "with" constraints in package
types cannot be made on types in submodules, so we export a type
here, that will be aliased in submodules and constrained in
package types. *)
type elt
module G : GROUP with type t = elt
module E : ELECTION with type elt = elt
end
module type BALLOT_BOX_BUNDLE = sig
type receipt
type ballot
include ELECTION_BUNDLE
include MONADIC_MAP_RO with type 'a m = 'a E.m
and type elt := ballot
and type key := receipt
end
......@@ -20,6 +20,7 @@
(**************************************************************************)
open Serializable_builtin_t
open Signatures
module type EMPTY = sig end
......@@ -242,12 +243,23 @@ type election_web = {
can_vote : acl;
}
module type ELECTION_BUNDLE = sig
(* It seems that with OCaml 3.12.1, "with" constraints in package
types cannot be made on types in submodules, so we export a type
here, that will be aliased in submodules and constrained in
package types. *)
type elt
module G : GROUP with type t = elt
module E : ELECTION with type elt = elt
end
module type WEB_BALLOT_BOX = sig
module Ballots : Signatures.MONADIC_MAP_RO
module Ballots : MONADIC_MAP_RO
with type 'a m = 'a Lwt.t
and type elt = string
and type key = string
module Records : Signatures.MONADIC_MAP_RO
module Records : MONADIC_MAP_RO
with type 'a m = 'a Lwt.t
and type elt = Serializable_builtin_t.datetime * string
and type key = string
......@@ -259,7 +271,7 @@ module type WEB_BALLOT_BOX = sig
end
module type WEB_ELECTION_BUNDLE =
Signatures.ELECTION_BUNDLE with type 'a E.m = 'a Lwt.t
ELECTION_BUNDLE with type 'a E.m = 'a Lwt.t
module type WEB_BALLOT_BOX_BUNDLE = sig
include WEB_ELECTION_BUNDLE
......@@ -268,7 +280,7 @@ end
type 'a web_election = {
modules : (module WEB_BALLOT_BOX_BUNDLE with type elt = 'a);
election : 'a Signatures.election;
election : 'a election;
election_web : election_web;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment