123456789101112131415161718192021222324252627282930(* This file is free software, part of containers. See file "license" for more details. *)typet=boolletequal(a:bool)b=Stdlib.(=)abletcompare(a:bool)b=Stdlib.compareabletif_thenfx=ifxthenSome(f())elseNoneletif_then_elsefgx=ifxthenf()elseg()letto_int(x:bool):int=ifxthen1else0letof_intx:t=x<>0type'aprinter=Format.formatter->'a->unitletpp=Format.pp_print_bool