Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module Base =
- struct
- type server_msg = .. [@@deriving yojson]
- type server_msg +=
- | SOk of string
- [@@deriving yojson]
- type client_msg = .. [@@deriving yojson]
- type client_msg +=
- | Push
- [@@deriving yojson]
- end
- module Make_base() = struct include Base end
- module type P =
- sig
- type app_server_msg = .. [@@deriving yojson]
- type app_client_msg = .. [@@deriving yojson]
- include (module type of Base)
- val pack_server_msg : string -> server_msg -> app_server_msg
- val unpack_server_msg : app_server_msg -> (string * server_msg) option
- val pack_client_msg : string -> client_msg -> app_client_msg
- val unpack_client_msg : app_client_msg -> (string * client_msg) option
- end
Add Comment
Please, Sign In to add comment