I really think this should be a bitmask. OCaml has facilities for transforming bitmasks to lists of variants and vice versa. See the convert_flag_list routine as used in e.g. https://github.com/ocaml/ocaml/blob/trunk/otherlibs/unix/open.c#L65. http://reviews.llvm.org/D4423