123456789101112131415161718192021open!Basetypet=One[@@derivingenumerate]letto_int=function|One->1;;letof_int=letmap=List.mapall~f:(funt->to_intt,t)|>Map.of_alist_exn(moduleInt)infuni~builder->matchMap.findmapiwith|Somet->t|None->letopen(valbuilder:Builder.S)inraise_error("Unknown stable version "^Int.to_stringi^". Known versions: "^(Map.keysmap|>List.map~f:Int.to_string|>String.concat~sep:", "));;