let main () : unit Deferred.t =
let open Suit in
let open Rank in
let open Card in
let card = {
suit = Spades;
rank = Ace;
} in
let card_module = (module Card: Bin_prot.Binable.S with type t = Card.t) in
(* card -> string *)
let s = Binable.to_string card_module card in
print_endline s;
(* card -> string -> card *)
let card' = Binable.of_string card_module s in
print_endline (Sexp.to_string (Card.sexp_of_t card'));
return ()