@tellahq/rescript 10.1.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1717 -0
- package/COPYING +674 -0
- package/COPYING.LESSER +165 -0
- package/CREDITS.md +59 -0
- package/LICENSE +24 -0
- package/README.md +114 -0
- package/bsc +22 -0
- package/bsrefmt +16 -0
- package/darwin/bsb_helper.exe +0 -0
- package/darwin/bsc.exe +0 -0
- package/darwin/ninja.COPYING +202 -0
- package/darwin/ninja.exe +0 -0
- package/darwin/refmt.exe +0 -0
- package/darwin/rescript.exe +0 -0
- package/darwinarm64/bsb_helper.exe +0 -0
- package/darwinarm64/bsc.exe +0 -0
- package/darwinarm64/ninja.COPYING +202 -0
- package/darwinarm64/ninja.exe +0 -0
- package/darwinarm64/refmt.exe +0 -0
- package/darwinarm64/rescript.exe +0 -0
- package/docs/docson/build-schema.json +557 -0
- package/freebsd/ninja.COPYING +202 -0
- package/jscomp/stubs/ext_basic_hash_stubs.c +216 -0
- package/lib/4.06.1/bsb_helper.ml +2436 -0
- package/lib/4.06.1/bsb_helper.mli +0 -0
- package/lib/4.06.1/refmt_main3.ml +115517 -0
- package/lib/4.06.1/refmt_main3.mli +1 -0
- package/lib/4.06.1/rescript.ml +15500 -0
- package/lib/4.06.1/rescript.mli +0 -0
- package/lib/4.06.1/whole_compiler.ml +306395 -0
- package/lib/4.06.1/whole_compiler.mli +0 -0
- package/lib/bstracing +270 -0
- package/lib/es6/arg.js +717 -0
- package/lib/es6/array.js +511 -0
- package/lib/es6/arrayLabels.js +511 -0
- package/lib/es6/belt.js +57 -0
- package/lib/es6/belt_Array.js +764 -0
- package/lib/es6/belt_Float.js +16 -0
- package/lib/es6/belt_HashMap.js +280 -0
- package/lib/es6/belt_HashMapInt.js +264 -0
- package/lib/es6/belt_HashMapString.js +264 -0
- package/lib/es6/belt_HashSet.js +222 -0
- package/lib/es6/belt_HashSetInt.js +207 -0
- package/lib/es6/belt_HashSetString.js +207 -0
- package/lib/es6/belt_Id.js +71 -0
- package/lib/es6/belt_Int.js +16 -0
- package/lib/es6/belt_List.js +1512 -0
- package/lib/es6/belt_Map.js +376 -0
- package/lib/es6/belt_MapDict.js +417 -0
- package/lib/es6/belt_MapInt.js +307 -0
- package/lib/es6/belt_MapString.js +307 -0
- package/lib/es6/belt_MutableMap.js +395 -0
- package/lib/es6/belt_MutableMapInt.js +362 -0
- package/lib/es6/belt_MutableMapString.js +362 -0
- package/lib/es6/belt_MutableQueue.js +299 -0
- package/lib/es6/belt_MutableSet.js +538 -0
- package/lib/es6/belt_MutableSetInt.js +501 -0
- package/lib/es6/belt_MutableSetString.js +501 -0
- package/lib/es6/belt_MutableStack.js +137 -0
- package/lib/es6/belt_Option.js +151 -0
- package/lib/es6/belt_Range.js +109 -0
- package/lib/es6/belt_Result.js +136 -0
- package/lib/es6/belt_Set.js +314 -0
- package/lib/es6/belt_SetDict.js +362 -0
- package/lib/es6/belt_SetInt.js +359 -0
- package/lib/es6/belt_SetString.js +359 -0
- package/lib/es6/belt_SortArray.js +427 -0
- package/lib/es6/belt_SortArrayInt.js +374 -0
- package/lib/es6/belt_SortArrayString.js +374 -0
- package/lib/es6/belt_internalAVLset.js +940 -0
- package/lib/es6/belt_internalAVLtree.js +1146 -0
- package/lib/es6/belt_internalBuckets.js +287 -0
- package/lib/es6/belt_internalBucketsType.js +49 -0
- package/lib/es6/belt_internalMapInt.js +365 -0
- package/lib/es6/belt_internalMapString.js +365 -0
- package/lib/es6/belt_internalSetBuckets.js +191 -0
- package/lib/es6/belt_internalSetInt.js +209 -0
- package/lib/es6/belt_internalSetString.js +209 -0
- package/lib/es6/buffer.js +477 -0
- package/lib/es6/bytes.js +704 -0
- package/lib/es6/bytesLabels.js +704 -0
- package/lib/es6/callback.js +16 -0
- package/lib/es6/caml.js +196 -0
- package/lib/es6/caml_array.js +122 -0
- package/lib/es6/caml_array_extern.js +1 -0
- package/lib/es6/caml_bytes.js +122 -0
- package/lib/es6/caml_exceptions.js +31 -0
- package/lib/es6/caml_external_polyfill.js +32 -0
- package/lib/es6/caml_float.js +129 -0
- package/lib/es6/caml_float_extern.js +1 -0
- package/lib/es6/caml_format.js +818 -0
- package/lib/es6/caml_hash.js +101 -0
- package/lib/es6/caml_hash_primitive.js +51 -0
- package/lib/es6/caml_int32.js +28 -0
- package/lib/es6/caml_int64.js +606 -0
- package/lib/es6/caml_int64_extern.js +1 -0
- package/lib/es6/caml_js_exceptions.js +31 -0
- package/lib/es6/caml_lexer.js +258 -0
- package/lib/es6/caml_md5.js +168 -0
- package/lib/es6/caml_module.js +117 -0
- package/lib/es6/caml_nativeint_extern.js +1 -0
- package/lib/es6/caml_obj.js +413 -0
- package/lib/es6/caml_option.js +86 -0
- package/lib/es6/caml_parser.js +303 -0
- package/lib/es6/caml_splice_call.js +52 -0
- package/lib/es6/caml_string.js +23 -0
- package/lib/es6/caml_string_extern.js +1 -0
- package/lib/es6/caml_sys.js +99 -0
- package/lib/es6/caml_undefined_extern.js +1 -0
- package/lib/es6/camlinternalLazy.js +59 -0
- package/lib/es6/camlinternalMod.js +1 -0
- package/lib/es6/char.js +126 -0
- package/lib/es6/complex.js +176 -0
- package/lib/es6/curry.js +526 -0
- package/lib/es6/digest.js +118 -0
- package/lib/es6/dom.js +12 -0
- package/lib/es6/dom_storage.js +27 -0
- package/lib/es6/dom_storage2.js +1 -0
- package/lib/es6/filename.js +496 -0
- package/lib/es6/genlex.js +666 -0
- package/lib/es6/hashtbl.js +1115 -0
- package/lib/es6/hashtblLabels.js +170 -0
- package/lib/es6/int32.js +75 -0
- package/lib/es6/int64.js +70 -0
- package/lib/es6/js.js +111 -0
- package/lib/es6/js_OO.js +15 -0
- package/lib/es6/js_array.js +223 -0
- package/lib/es6/js_array2.js +1 -0
- package/lib/es6/js_bigint.js +1 -0
- package/lib/es6/js_cast.js +1 -0
- package/lib/es6/js_console.js +1 -0
- package/lib/es6/js_date.js +1 -0
- package/lib/es6/js_dict.js +85 -0
- package/lib/es6/js_exn.js +44 -0
- package/lib/es6/js_float.js +1 -0
- package/lib/es6/js_global.js +1 -0
- package/lib/es6/js_int.js +17 -0
- package/lib/es6/js_json.js +172 -0
- package/lib/es6/js_list.js +333 -0
- package/lib/es6/js_map.js +1 -0
- package/lib/es6/js_mapperRt.js +54 -0
- package/lib/es6/js_math.js +50 -0
- package/lib/es6/js_null.js +49 -0
- package/lib/es6/js_null_undefined.js +35 -0
- package/lib/es6/js_obj.js +1 -0
- package/lib/es6/js_option.js +104 -0
- package/lib/es6/js_promise.js +17 -0
- package/lib/es6/js_re.js +1 -0
- package/lib/es6/js_result.js +1 -0
- package/lib/es6/js_set.js +1 -0
- package/lib/es6/js_string.js +199 -0
- package/lib/es6/js_string2.js +1 -0
- package/lib/es6/js_typed_array.js +1733 -0
- package/lib/es6/js_typed_array2.js +39 -0
- package/lib/es6/js_types.js +77 -0
- package/lib/es6/js_undefined.js +52 -0
- package/lib/es6/js_vector.js +134 -0
- package/lib/es6/js_weakmap.js +1 -0
- package/lib/es6/js_weakset.js +1 -0
- package/lib/es6/jsx.js +1 -0
- package/lib/es6/jsxDOM.js +1 -0
- package/lib/es6/jsxDOMStyle.js +1 -0
- package/lib/es6/jsxEvent.js +59 -0
- package/lib/es6/lazy.js +44 -0
- package/lib/es6/lexing.js +217 -0
- package/lib/es6/list.js +1713 -0
- package/lib/es6/listLabels.js +1713 -0
- package/lib/es6/map.js +936 -0
- package/lib/es6/mapLabels.js +951 -0
- package/lib/es6/moreLabels.js +1931 -0
- package/lib/es6/node.js +39 -0
- package/lib/es6/node_buffer.js +1 -0
- package/lib/es6/node_child_process.js +1 -0
- package/lib/es6/node_fs.js +9 -0
- package/lib/es6/node_module.js +1 -0
- package/lib/es6/node_path.js +1 -0
- package/lib/es6/node_process.js +18 -0
- package/lib/es6/obj.js +11 -0
- package/lib/es6/package.json +1 -0
- package/lib/es6/parsing.js +237 -0
- package/lib/es6/pervasives.js +250 -0
- package/lib/es6/printexc.js +102 -0
- package/lib/es6/queue.js +181 -0
- package/lib/es6/random.js +280 -0
- package/lib/es6/set.js +955 -0
- package/lib/es6/setLabels.js +988 -0
- package/lib/es6/sort.js +168 -0
- package/lib/es6/stack.js +88 -0
- package/lib/es6/stdLabels.js +18 -0
- package/lib/es6/stream.js +496 -0
- package/lib/es6/string.js +337 -0
- package/lib/es6/stringLabels.js +337 -0
- package/lib/es6/sys.js +182 -0
- package/lib/es6/uchar.js +133 -0
- package/lib/js/arg.js +715 -0
- package/lib/js/array.js +509 -0
- package/lib/js/arrayLabels.js +509 -0
- package/lib/js/belt.js +55 -0
- package/lib/js/belt_Array.js +762 -0
- package/lib/js/belt_Float.js +14 -0
- package/lib/js/belt_HashMap.js +278 -0
- package/lib/js/belt_HashMapInt.js +262 -0
- package/lib/js/belt_HashMapString.js +262 -0
- package/lib/js/belt_HashSet.js +220 -0
- package/lib/js/belt_HashSetInt.js +205 -0
- package/lib/js/belt_HashSetString.js +205 -0
- package/lib/js/belt_Id.js +69 -0
- package/lib/js/belt_Int.js +14 -0
- package/lib/js/belt_List.js +1510 -0
- package/lib/js/belt_Map.js +374 -0
- package/lib/js/belt_MapDict.js +415 -0
- package/lib/js/belt_MapInt.js +305 -0
- package/lib/js/belt_MapString.js +305 -0
- package/lib/js/belt_MutableMap.js +393 -0
- package/lib/js/belt_MutableMapInt.js +360 -0
- package/lib/js/belt_MutableMapString.js +360 -0
- package/lib/js/belt_MutableQueue.js +297 -0
- package/lib/js/belt_MutableSet.js +536 -0
- package/lib/js/belt_MutableSetInt.js +499 -0
- package/lib/js/belt_MutableSetString.js +499 -0
- package/lib/js/belt_MutableStack.js +135 -0
- package/lib/js/belt_Option.js +149 -0
- package/lib/js/belt_Range.js +107 -0
- package/lib/js/belt_Result.js +134 -0
- package/lib/js/belt_Set.js +312 -0
- package/lib/js/belt_SetDict.js +360 -0
- package/lib/js/belt_SetInt.js +357 -0
- package/lib/js/belt_SetString.js +357 -0
- package/lib/js/belt_SortArray.js +425 -0
- package/lib/js/belt_SortArrayInt.js +372 -0
- package/lib/js/belt_SortArrayString.js +372 -0
- package/lib/js/belt_internalAVLset.js +938 -0
- package/lib/js/belt_internalAVLtree.js +1144 -0
- package/lib/js/belt_internalBuckets.js +285 -0
- package/lib/js/belt_internalBucketsType.js +47 -0
- package/lib/js/belt_internalMapInt.js +363 -0
- package/lib/js/belt_internalMapString.js +363 -0
- package/lib/js/belt_internalSetBuckets.js +189 -0
- package/lib/js/belt_internalSetInt.js +207 -0
- package/lib/js/belt_internalSetString.js +207 -0
- package/lib/js/buffer.js +475 -0
- package/lib/js/bytes.js +702 -0
- package/lib/js/bytesLabels.js +702 -0
- package/lib/js/callback.js +14 -0
- package/lib/js/caml.js +194 -0
- package/lib/js/caml_array.js +120 -0
- package/lib/js/caml_array_extern.js +1 -0
- package/lib/js/caml_bytes.js +120 -0
- package/lib/js/caml_exceptions.js +29 -0
- package/lib/js/caml_external_polyfill.js +30 -0
- package/lib/js/caml_float.js +127 -0
- package/lib/js/caml_float_extern.js +1 -0
- package/lib/js/caml_format.js +816 -0
- package/lib/js/caml_hash.js +99 -0
- package/lib/js/caml_hash_primitive.js +49 -0
- package/lib/js/caml_int32.js +26 -0
- package/lib/js/caml_int64.js +604 -0
- package/lib/js/caml_int64_extern.js +1 -0
- package/lib/js/caml_js_exceptions.js +29 -0
- package/lib/js/caml_lexer.js +256 -0
- package/lib/js/caml_md5.js +166 -0
- package/lib/js/caml_module.js +115 -0
- package/lib/js/caml_nativeint_extern.js +1 -0
- package/lib/js/caml_obj.js +411 -0
- package/lib/js/caml_option.js +84 -0
- package/lib/js/caml_parser.js +301 -0
- package/lib/js/caml_splice_call.js +50 -0
- package/lib/js/caml_string.js +21 -0
- package/lib/js/caml_string_extern.js +1 -0
- package/lib/js/caml_sys.js +97 -0
- package/lib/js/caml_undefined_extern.js +1 -0
- package/lib/js/camlinternalLazy.js +57 -0
- package/lib/js/camlinternalMod.js +1 -0
- package/lib/js/char.js +124 -0
- package/lib/js/complex.js +174 -0
- package/lib/js/curry.js +524 -0
- package/lib/js/digest.js +116 -0
- package/lib/js/dom.js +10 -0
- package/lib/js/dom_storage.js +25 -0
- package/lib/js/dom_storage2.js +1 -0
- package/lib/js/filename.js +494 -0
- package/lib/js/genlex.js +664 -0
- package/lib/js/hashtbl.js +1113 -0
- package/lib/js/hashtblLabels.js +168 -0
- package/lib/js/int32.js +73 -0
- package/lib/js/int64.js +68 -0
- package/lib/js/js.js +109 -0
- package/lib/js/js_OO.js +13 -0
- package/lib/js/js_array.js +221 -0
- package/lib/js/js_array2.js +1 -0
- package/lib/js/js_bigint.js +1 -0
- package/lib/js/js_cast.js +1 -0
- package/lib/js/js_console.js +1 -0
- package/lib/js/js_date.js +1 -0
- package/lib/js/js_dict.js +83 -0
- package/lib/js/js_exn.js +42 -0
- package/lib/js/js_float.js +1 -0
- package/lib/js/js_global.js +1 -0
- package/lib/js/js_int.js +15 -0
- package/lib/js/js_json.js +170 -0
- package/lib/js/js_list.js +331 -0
- package/lib/js/js_map.js +1 -0
- package/lib/js/js_mapperRt.js +52 -0
- package/lib/js/js_math.js +48 -0
- package/lib/js/js_null.js +47 -0
- package/lib/js/js_null_undefined.js +33 -0
- package/lib/js/js_obj.js +1 -0
- package/lib/js/js_option.js +103 -0
- package/lib/js/js_promise.js +15 -0
- package/lib/js/js_re.js +1 -0
- package/lib/js/js_result.js +1 -0
- package/lib/js/js_set.js +1 -0
- package/lib/js/js_string.js +197 -0
- package/lib/js/js_string2.js +1 -0
- package/lib/js/js_typed_array.js +1731 -0
- package/lib/js/js_typed_array2.js +37 -0
- package/lib/js/js_types.js +75 -0
- package/lib/js/js_undefined.js +50 -0
- package/lib/js/js_vector.js +132 -0
- package/lib/js/js_weakmap.js +1 -0
- package/lib/js/js_weakset.js +1 -0
- package/lib/js/jsx.js +1 -0
- package/lib/js/jsxDOM.js +1 -0
- package/lib/js/jsxDOMStyle.js +1 -0
- package/lib/js/jsxEvent.js +57 -0
- package/lib/js/lazy.js +42 -0
- package/lib/js/lexing.js +215 -0
- package/lib/js/list.js +1711 -0
- package/lib/js/listLabels.js +1711 -0
- package/lib/js/map.js +934 -0
- package/lib/js/mapLabels.js +949 -0
- package/lib/js/moreLabels.js +1929 -0
- package/lib/js/node.js +37 -0
- package/lib/js/node_buffer.js +1 -0
- package/lib/js/node_child_process.js +1 -0
- package/lib/js/node_fs.js +7 -0
- package/lib/js/node_module.js +1 -0
- package/lib/js/node_path.js +1 -0
- package/lib/js/node_process.js +16 -0
- package/lib/js/obj.js +9 -0
- package/lib/js/parsing.js +235 -0
- package/lib/js/pervasives.js +248 -0
- package/lib/js/printexc.js +100 -0
- package/lib/js/queue.js +179 -0
- package/lib/js/random.js +278 -0
- package/lib/js/set.js +953 -0
- package/lib/js/setLabels.js +986 -0
- package/lib/js/sort.js +166 -0
- package/lib/js/stack.js +86 -0
- package/lib/js/stdLabels.js +16 -0
- package/lib/js/stream.js +494 -0
- package/lib/js/string.js +335 -0
- package/lib/js/stringLabels.js +335 -0
- package/lib/js/sys.js +180 -0
- package/lib/js/uchar.js +131 -0
- package/lib/minisocket.js +93 -0
- package/lib/ocaml/arg.cmi +0 -0
- package/lib/ocaml/arg.cmt +0 -0
- package/lib/ocaml/arg.cmti +0 -0
- package/lib/ocaml/arg.ml +359 -0
- package/lib/ocaml/arg.mli +185 -0
- package/lib/ocaml/array.cmi +0 -0
- package/lib/ocaml/array.cmt +0 -0
- package/lib/ocaml/array.cmti +0 -0
- package/lib/ocaml/array.ml +307 -0
- package/lib/ocaml/array.mli +275 -0
- package/lib/ocaml/arrayLabels.cmi +0 -0
- package/lib/ocaml/arrayLabels.cmt +0 -0
- package/lib/ocaml/arrayLabels.cmti +0 -0
- package/lib/ocaml/arrayLabels.ml +307 -0
- package/lib/ocaml/arrayLabels.mli +276 -0
- package/lib/ocaml/belt.cmi +0 -0
- package/lib/ocaml/belt.cmt +0 -0
- package/lib/ocaml/belt.ml +352 -0
- package/lib/ocaml/belt_Array.cmi +0 -0
- package/lib/ocaml/belt_Array.cmt +0 -0
- package/lib/ocaml/belt_Array.cmti +0 -0
- package/lib/ocaml/belt_Array.ml +525 -0
- package/lib/ocaml/belt_Array.mli +707 -0
- package/lib/ocaml/belt_Float.cmi +0 -0
- package/lib/ocaml/belt_Float.cmt +0 -0
- package/lib/ocaml/belt_Float.cmti +0 -0
- package/lib/ocaml/belt_Float.ml +50 -0
- package/lib/ocaml/belt_Float.mli +106 -0
- package/lib/ocaml/belt_HashMap.cmi +0 -0
- package/lib/ocaml/belt_HashMap.cmt +0 -0
- package/lib/ocaml/belt_HashMap.cmti +0 -0
- package/lib/ocaml/belt_HashMap.ml +226 -0
- package/lib/ocaml/belt_HashMap.mli +436 -0
- package/lib/ocaml/belt_HashMapInt.cmi +0 -0
- package/lib/ocaml/belt_HashMapInt.cmt +0 -0
- package/lib/ocaml/belt_HashMapInt.cmti +0 -0
- package/lib/ocaml/belt_HashMapInt.ml +206 -0
- package/lib/ocaml/belt_HashMapInt.mli +50 -0
- package/lib/ocaml/belt_HashMapString.cmi +0 -0
- package/lib/ocaml/belt_HashMapString.cmt +0 -0
- package/lib/ocaml/belt_HashMapString.cmti +0 -0
- package/lib/ocaml/belt_HashMapString.ml +206 -0
- package/lib/ocaml/belt_HashMapString.mli +50 -0
- package/lib/ocaml/belt_HashSet.cmi +0 -0
- package/lib/ocaml/belt_HashSet.cmt +0 -0
- package/lib/ocaml/belt_HashSet.cmti +0 -0
- package/lib/ocaml/belt_HashSet.ml +196 -0
- package/lib/ocaml/belt_HashSet.mli +125 -0
- package/lib/ocaml/belt_HashSetInt.cmi +0 -0
- package/lib/ocaml/belt_HashSetInt.cmt +0 -0
- package/lib/ocaml/belt_HashSetInt.cmti +0 -0
- package/lib/ocaml/belt_HashSetInt.ml +155 -0
- package/lib/ocaml/belt_HashSetInt.mli +74 -0
- package/lib/ocaml/belt_HashSetString.cmi +0 -0
- package/lib/ocaml/belt_HashSetString.cmt +0 -0
- package/lib/ocaml/belt_HashSetString.cmti +0 -0
- package/lib/ocaml/belt_HashSetString.ml +156 -0
- package/lib/ocaml/belt_HashSetString.mli +74 -0
- package/lib/ocaml/belt_Id.cmi +0 -0
- package/lib/ocaml/belt_Id.cmt +0 -0
- package/lib/ocaml/belt_Id.cmti +0 -0
- package/lib/ocaml/belt_Id.ml +133 -0
- package/lib/ocaml/belt_Id.mli +171 -0
- package/lib/ocaml/belt_Int.cmi +0 -0
- package/lib/ocaml/belt_Int.cmt +0 -0
- package/lib/ocaml/belt_Int.cmti +0 -0
- package/lib/ocaml/belt_Int.ml +50 -0
- package/lib/ocaml/belt_Int.mli +103 -0
- package/lib/ocaml/belt_List.cmi +0 -0
- package/lib/ocaml/belt_List.cmt +0 -0
- package/lib/ocaml/belt_List.cmti +0 -0
- package/lib/ocaml/belt_List.ml +803 -0
- package/lib/ocaml/belt_List.mli +844 -0
- package/lib/ocaml/belt_Map.cmi +0 -0
- package/lib/ocaml/belt_Map.cmt +0 -0
- package/lib/ocaml/belt_Map.cmti +0 -0
- package/lib/ocaml/belt_Map.ml +170 -0
- package/lib/ocaml/belt_Map.mli +496 -0
- package/lib/ocaml/belt_MapDict.cmi +0 -0
- package/lib/ocaml/belt_MapDict.cmt +0 -0
- package/lib/ocaml/belt_MapDict.cmti +0 -0
- package/lib/ocaml/belt_MapDict.ml +278 -0
- package/lib/ocaml/belt_MapDict.mli +268 -0
- package/lib/ocaml/belt_MapInt.cmi +0 -0
- package/lib/ocaml/belt_MapInt.cmt +0 -0
- package/lib/ocaml/belt_MapInt.cmti +0 -0
- package/lib/ocaml/belt_MapInt.ml +169 -0
- package/lib/ocaml/belt_MapInt.mli +187 -0
- package/lib/ocaml/belt_MapString.cmi +0 -0
- package/lib/ocaml/belt_MapString.cmt +0 -0
- package/lib/ocaml/belt_MapString.cmti +0 -0
- package/lib/ocaml/belt_MapString.ml +169 -0
- package/lib/ocaml/belt_MapString.mli +187 -0
- package/lib/ocaml/belt_MutableMap.cmi +0 -0
- package/lib/ocaml/belt_MutableMap.cmt +0 -0
- package/lib/ocaml/belt_MutableMap.cmti +0 -0
- package/lib/ocaml/belt_MutableMap.ml +241 -0
- package/lib/ocaml/belt_MutableMap.mli +145 -0
- package/lib/ocaml/belt_MutableMapInt.cmi +0 -0
- package/lib/ocaml/belt_MutableMapInt.cmt +0 -0
- package/lib/ocaml/belt_MutableMapInt.cmti +0 -0
- package/lib/ocaml/belt_MutableMapInt.ml +172 -0
- package/lib/ocaml/belt_MutableMapInt.mli +135 -0
- package/lib/ocaml/belt_MutableMapString.cmi +0 -0
- package/lib/ocaml/belt_MutableMapString.cmt +0 -0
- package/lib/ocaml/belt_MutableMapString.cmti +0 -0
- package/lib/ocaml/belt_MutableMapString.ml +172 -0
- package/lib/ocaml/belt_MutableMapString.mli +135 -0
- package/lib/ocaml/belt_MutableQueue.cmi +0 -0
- package/lib/ocaml/belt_MutableQueue.cmt +0 -0
- package/lib/ocaml/belt_MutableQueue.cmti +0 -0
- package/lib/ocaml/belt_MutableQueue.ml +222 -0
- package/lib/ocaml/belt_MutableQueue.mli +116 -0
- package/lib/ocaml/belt_MutableSet.cmi +0 -0
- package/lib/ocaml/belt_MutableSet.cmt +0 -0
- package/lib/ocaml/belt_MutableSet.cmti +0 -0
- package/lib/ocaml/belt_MutableSet.ml +371 -0
- package/lib/ocaml/belt_MutableSet.mli +617 -0
- package/lib/ocaml/belt_MutableSetInt.cmi +0 -0
- package/lib/ocaml/belt_MutableSetInt.cmt +0 -0
- package/lib/ocaml/belt_MutableSetInt.cmti +0 -0
- package/lib/ocaml/belt_MutableSetInt.ml +342 -0
- package/lib/ocaml/belt_MutableSetInt.mli +124 -0
- package/lib/ocaml/belt_MutableSetString.cmi +0 -0
- package/lib/ocaml/belt_MutableSetString.cmt +0 -0
- package/lib/ocaml/belt_MutableSetString.cmti +0 -0
- package/lib/ocaml/belt_MutableSetString.ml +342 -0
- package/lib/ocaml/belt_MutableSetString.mli +124 -0
- package/lib/ocaml/belt_MutableStack.cmi +0 -0
- package/lib/ocaml/belt_MutableStack.cmt +0 -0
- package/lib/ocaml/belt_MutableStack.cmti +0 -0
- package/lib/ocaml/belt_MutableStack.ml +106 -0
- package/lib/ocaml/belt_MutableStack.mli +63 -0
- package/lib/ocaml/belt_Option.cmi +0 -0
- package/lib/ocaml/belt_Option.cmt +0 -0
- package/lib/ocaml/belt_Option.cmti +0 -0
- package/lib/ocaml/belt_Option.ml +93 -0
- package/lib/ocaml/belt_Option.mli +270 -0
- package/lib/ocaml/belt_Range.cmi +0 -0
- package/lib/ocaml/belt_Range.cmt +0 -0
- package/lib/ocaml/belt_Range.cmti +0 -0
- package/lib/ocaml/belt_Range.ml +76 -0
- package/lib/ocaml/belt_Range.mli +114 -0
- package/lib/ocaml/belt_Result.cmi +0 -0
- package/lib/ocaml/belt_Result.cmt +0 -0
- package/lib/ocaml/belt_Result.cmti +0 -0
- package/lib/ocaml/belt_Result.ml +75 -0
- package/lib/ocaml/belt_Result.mli +205 -0
- package/lib/ocaml/belt_Set.cmi +0 -0
- package/lib/ocaml/belt_Set.cmt +0 -0
- package/lib/ocaml/belt_Set.cmti +0 -0
- package/lib/ocaml/belt_Set.cppo.ml +205 -0
- package/lib/ocaml/belt_Set.cppo.mli +153 -0
- package/lib/ocaml/belt_Set.ml +164 -0
- package/lib/ocaml/belt_Set.mli +523 -0
- package/lib/ocaml/belt_SetDict.cmi +0 -0
- package/lib/ocaml/belt_SetDict.cmt +0 -0
- package/lib/ocaml/belt_SetDict.cmti +0 -0
- package/lib/ocaml/belt_SetDict.ml +237 -0
- package/lib/ocaml/belt_SetDict.mli +567 -0
- package/lib/ocaml/belt_SetInt.cmi +0 -0
- package/lib/ocaml/belt_SetInt.cmt +0 -0
- package/lib/ocaml/belt_SetInt.cmti +0 -0
- package/lib/ocaml/belt_SetInt.ml +201 -0
- package/lib/ocaml/belt_SetInt.mli +151 -0
- package/lib/ocaml/belt_SetString.cmi +0 -0
- package/lib/ocaml/belt_SetString.cmt +0 -0
- package/lib/ocaml/belt_SetString.cmti +0 -0
- package/lib/ocaml/belt_SetString.ml +201 -0
- package/lib/ocaml/belt_SetString.mli +151 -0
- package/lib/ocaml/belt_SortArray.cmi +0 -0
- package/lib/ocaml/belt_SortArray.cmt +0 -0
- package/lib/ocaml/belt_SortArray.cmti +0 -0
- package/lib/ocaml/belt_SortArray.ml +322 -0
- package/lib/ocaml/belt_SortArray.mli +146 -0
- package/lib/ocaml/belt_SortArrayInt.cmi +0 -0
- package/lib/ocaml/belt_SortArrayInt.cmt +0 -0
- package/lib/ocaml/belt_SortArrayInt.cmti +0 -0
- package/lib/ocaml/belt_SortArrayInt.ml +263 -0
- package/lib/ocaml/belt_SortArrayInt.mli +93 -0
- package/lib/ocaml/belt_SortArrayString.cmi +0 -0
- package/lib/ocaml/belt_SortArrayString.cmt +0 -0
- package/lib/ocaml/belt_SortArrayString.cmti +0 -0
- package/lib/ocaml/belt_SortArrayString.ml +263 -0
- package/lib/ocaml/belt_SortArrayString.mli +93 -0
- package/lib/ocaml/belt_internalAVLset.cmt +0 -0
- package/lib/ocaml/belt_internalAVLset.cmti +0 -0
- package/lib/ocaml/belt_internalAVLset.ml +665 -0
- package/lib/ocaml/belt_internalAVLset.mli +124 -0
- package/lib/ocaml/belt_internalAVLtree.cmt +0 -0
- package/lib/ocaml/belt_internalAVLtree.cmti +0 -0
- package/lib/ocaml/belt_internalAVLtree.ml +762 -0
- package/lib/ocaml/belt_internalAVLtree.mli +215 -0
- package/lib/ocaml/belt_internalBuckets.cmt +0 -0
- package/lib/ocaml/belt_internalBuckets.cmti +0 -0
- package/lib/ocaml/belt_internalBuckets.ml +218 -0
- package/lib/ocaml/belt_internalBuckets.mli +57 -0
- package/lib/ocaml/belt_internalBucketsType.cmt +0 -0
- package/lib/ocaml/belt_internalBucketsType.cmti +0 -0
- package/lib/ocaml/belt_internalBucketsType.ml +59 -0
- package/lib/ocaml/belt_internalBucketsType.mli +46 -0
- package/lib/ocaml/belt_internalMapInt.cmt +0 -0
- package/lib/ocaml/belt_internalMapInt.ml +227 -0
- package/lib/ocaml/belt_internalMapString.cmt +0 -0
- package/lib/ocaml/belt_internalMapString.ml +227 -0
- package/lib/ocaml/belt_internalSetBuckets.cmt +0 -0
- package/lib/ocaml/belt_internalSetBuckets.cmti +0 -0
- package/lib/ocaml/belt_internalSetBuckets.ml +157 -0
- package/lib/ocaml/belt_internalSetBuckets.mli +47 -0
- package/lib/ocaml/belt_internalSetInt.cmt +0 -0
- package/lib/ocaml/belt_internalSetInt.ml +129 -0
- package/lib/ocaml/belt_internalSetString.cmt +0 -0
- package/lib/ocaml/belt_internalSetString.ml +129 -0
- package/lib/ocaml/belt_internals.cmti +0 -0
- package/lib/ocaml/belt_internals.mli +79 -0
- package/lib/ocaml/buffer.cmi +0 -0
- package/lib/ocaml/buffer.cmt +0 -0
- package/lib/ocaml/buffer.cmti +0 -0
- package/lib/ocaml/buffer.ml +250 -0
- package/lib/ocaml/buffer.mli +149 -0
- package/lib/ocaml/bytes.cmi +0 -0
- package/lib/ocaml/bytes.cmt +0 -0
- package/lib/ocaml/bytes.cmti +0 -0
- package/lib/ocaml/bytes.ml +431 -0
- package/lib/ocaml/bytes.mli +430 -0
- package/lib/ocaml/bytesLabels.cmi +0 -0
- package/lib/ocaml/bytesLabels.cmt +0 -0
- package/lib/ocaml/bytesLabels.cmti +0 -0
- package/lib/ocaml/bytesLabels.ml +428 -0
- package/lib/ocaml/bytesLabels.mli +276 -0
- package/lib/ocaml/callback.cmi +0 -0
- package/lib/ocaml/callback.cmt +0 -0
- package/lib/ocaml/callback.cmti +0 -0
- package/lib/ocaml/callback.ml +20 -0
- package/lib/ocaml/callback.mli +34 -0
- package/lib/ocaml/camlinternalLazy.cmi +0 -0
- package/lib/ocaml/camlinternalLazy.cmt +0 -0
- package/lib/ocaml/camlinternalLazy.cmti +0 -0
- package/lib/ocaml/camlinternalLazy.ml +89 -0
- package/lib/ocaml/camlinternalLazy.mli +27 -0
- package/lib/ocaml/camlinternalMod.cmi +0 -0
- package/lib/ocaml/camlinternalMod.cmt +0 -0
- package/lib/ocaml/camlinternalMod.cmti +0 -0
- package/lib/ocaml/camlinternalMod.ml +21 -0
- package/lib/ocaml/camlinternalMod.mli +25 -0
- package/lib/ocaml/char.cmi +0 -0
- package/lib/ocaml/char.cmt +0 -0
- package/lib/ocaml/char.cmti +0 -0
- package/lib/ocaml/char.ml +76 -0
- package/lib/ocaml/char.mli +72 -0
- package/lib/ocaml/complex.cmi +0 -0
- package/lib/ocaml/complex.cmt +0 -0
- package/lib/ocaml/complex.cmti +0 -0
- package/lib/ocaml/complex.ml +87 -0
- package/lib/ocaml/complex.mli +86 -0
- package/lib/ocaml/digest.cmi +0 -0
- package/lib/ocaml/digest.cmt +0 -0
- package/lib/ocaml/digest.cmti +0 -0
- package/lib/ocaml/digest.ml +66 -0
- package/lib/ocaml/digest.mli +68 -0
- package/lib/ocaml/dom.cmi +0 -0
- package/lib/ocaml/dom.cmt +0 -0
- package/lib/ocaml/dom.ml +296 -0
- package/lib/ocaml/dom_storage.cmi +0 -0
- package/lib/ocaml/dom_storage.cmt +0 -0
- package/lib/ocaml/dom_storage.ml +22 -0
- package/lib/ocaml/dom_storage2.cmi +0 -0
- package/lib/ocaml/dom_storage2.cmt +0 -0
- package/lib/ocaml/dom_storage2.ml +11 -0
- package/lib/ocaml/filename.cmi +0 -0
- package/lib/ocaml/filename.cmt +0 -0
- package/lib/ocaml/filename.cmti +0 -0
- package/lib/ocaml/filename.ml +233 -0
- package/lib/ocaml/filename.mli +134 -0
- package/lib/ocaml/genlex.cmi +0 -0
- package/lib/ocaml/genlex.cmt +0 -0
- package/lib/ocaml/genlex.cmti +0 -0
- package/lib/ocaml/genlex.ml +201 -0
- package/lib/ocaml/genlex.mli +73 -0
- package/lib/ocaml/hashmap.cppo.ml +214 -0
- package/lib/ocaml/hashmap.cppo.mli +54 -0
- package/lib/ocaml/hashset.cppo.ml +165 -0
- package/lib/ocaml/hashset.cppo.mli +77 -0
- package/lib/ocaml/hashtbl.cmi +0 -0
- package/lib/ocaml/hashtbl.cmt +0 -0
- package/lib/ocaml/hashtbl.cmti +0 -0
- package/lib/ocaml/hashtbl.ml +541 -0
- package/lib/ocaml/hashtbl.mli +411 -0
- package/lib/ocaml/hashtblLabels.cmi +0 -0
- package/lib/ocaml/hashtblLabels.cmt +0 -0
- package/lib/ocaml/hashtblLabels.ml +130 -0
- package/lib/ocaml/int32.cmi +0 -0
- package/lib/ocaml/int32.cmt +0 -0
- package/lib/ocaml/int32.cmti +0 -0
- package/lib/ocaml/int32.ml +64 -0
- package/lib/ocaml/int32.mli +186 -0
- package/lib/ocaml/int64.cmi +0 -0
- package/lib/ocaml/int64.cmt +0 -0
- package/lib/ocaml/int64.cmti +0 -0
- package/lib/ocaml/int64.ml +72 -0
- package/lib/ocaml/int64.mli +197 -0
- package/lib/ocaml/internal_map.cppo.ml +230 -0
- package/lib/ocaml/internal_set.cppo.ml +134 -0
- package/lib/ocaml/js.cmi +0 -0
- package/lib/ocaml/js.cmt +0 -0
- package/lib/ocaml/js.ml +313 -0
- package/lib/ocaml/js_OO.cmi +0 -0
- package/lib/ocaml/js_OO.cmt +0 -0
- package/lib/ocaml/js_OO.ml +180 -0
- package/lib/ocaml/js_array.cmi +0 -0
- package/lib/ocaml/js_array.cmt +0 -0
- package/lib/ocaml/js_array.ml +970 -0
- package/lib/ocaml/js_array2.cmi +0 -0
- package/lib/ocaml/js_array2.cmt +0 -0
- package/lib/ocaml/js_array2.ml +1065 -0
- package/lib/ocaml/js_bigint.cmi +0 -0
- package/lib/ocaml/js_bigint.cmt +0 -0
- package/lib/ocaml/js_bigint.ml +3 -0
- package/lib/ocaml/js_cast.cmi +0 -0
- package/lib/ocaml/js_cast.cmt +0 -0
- package/lib/ocaml/js_cast.cmti +0 -0
- package/lib/ocaml/js_cast.ml +29 -0
- package/lib/ocaml/js_cast.mli +45 -0
- package/lib/ocaml/js_console.cmi +0 -0
- package/lib/ocaml/js_console.cmt +0 -0
- package/lib/ocaml/js_console.ml +51 -0
- package/lib/ocaml/js_date.cmi +0 -0
- package/lib/ocaml/js_date.cmt +0 -0
- package/lib/ocaml/js_date.ml +1263 -0
- package/lib/ocaml/js_dict.cmi +0 -0
- package/lib/ocaml/js_dict.cmt +0 -0
- package/lib/ocaml/js_dict.cmti +0 -0
- package/lib/ocaml/js_dict.ml +114 -0
- package/lib/ocaml/js_dict.mli +152 -0
- package/lib/ocaml/js_exn.cmi +0 -0
- package/lib/ocaml/js_exn.cmt +0 -0
- package/lib/ocaml/js_exn.cmti +0 -0
- package/lib/ocaml/js_exn.ml +102 -0
- package/lib/ocaml/js_exn.mli +79 -0
- package/lib/ocaml/js_float.cmi +0 -0
- package/lib/ocaml/js_float.cmt +0 -0
- package/lib/ocaml/js_float.ml +294 -0
- package/lib/ocaml/js_global.cmi +0 -0
- package/lib/ocaml/js_global.cmt +0 -0
- package/lib/ocaml/js_global.ml +185 -0
- package/lib/ocaml/js_int.cmi +0 -0
- package/lib/ocaml/js_int.cmt +0 -0
- package/lib/ocaml/js_int.ml +158 -0
- package/lib/ocaml/js_json.cmi +0 -0
- package/lib/ocaml/js_json.cmt +0 -0
- package/lib/ocaml/js_json.cmti +0 -0
- package/lib/ocaml/js_json.ml +195 -0
- package/lib/ocaml/js_json.mli +244 -0
- package/lib/ocaml/js_list.cmi +0 -0
- package/lib/ocaml/js_list.cmt +0 -0
- package/lib/ocaml/js_list.cmti +0 -0
- package/lib/ocaml/js_list.ml +174 -0
- package/lib/ocaml/js_list.mli +72 -0
- package/lib/ocaml/js_map.cmi +0 -0
- package/lib/ocaml/js_map.cmt +0 -0
- package/lib/ocaml/js_map.ml +3 -0
- package/lib/ocaml/js_mapperRt.cmi +0 -0
- package/lib/ocaml/js_mapperRt.cmt +0 -0
- package/lib/ocaml/js_mapperRt.cmti +0 -0
- package/lib/ocaml/js_mapperRt.ml +50 -0
- package/lib/ocaml/js_mapperRt.mli +44 -0
- package/lib/ocaml/js_math.cmi +0 -0
- package/lib/ocaml/js_math.cmt +0 -0
- package/lib/ocaml/js_math.ml +626 -0
- package/lib/ocaml/js_null.cmi +0 -0
- package/lib/ocaml/js_null.cmt +0 -0
- package/lib/ocaml/js_null.cmti +0 -0
- package/lib/ocaml/js_null.ml +57 -0
- package/lib/ocaml/js_null.mli +87 -0
- package/lib/ocaml/js_null_undefined.cmi +0 -0
- package/lib/ocaml/js_null_undefined.cmt +0 -0
- package/lib/ocaml/js_null_undefined.cmti +0 -0
- package/lib/ocaml/js_null_undefined.ml +50 -0
- package/lib/ocaml/js_null_undefined.mli +85 -0
- package/lib/ocaml/js_obj.cmi +0 -0
- package/lib/ocaml/js_obj.cmt +0 -0
- package/lib/ocaml/js_obj.ml +100 -0
- package/lib/ocaml/js_option.cmi +0 -0
- package/lib/ocaml/js_option.cmt +0 -0
- package/lib/ocaml/js_option.cmti +0 -0
- package/lib/ocaml/js_option.ml +203 -0
- package/lib/ocaml/js_option.mli +52 -0
- package/lib/ocaml/js_promise.cmi +0 -0
- package/lib/ocaml/js_promise.cmt +0 -0
- package/lib/ocaml/js_promise.ml +100 -0
- package/lib/ocaml/js_re.cmi +0 -0
- package/lib/ocaml/js_re.cmt +0 -0
- package/lib/ocaml/js_re.ml +184 -0
- package/lib/ocaml/js_result.cmi +0 -0
- package/lib/ocaml/js_result.cmt +0 -0
- package/lib/ocaml/js_result.cmti +0 -0
- package/lib/ocaml/js_result.ml +28 -0
- package/lib/ocaml/js_result.mli +28 -0
- package/lib/ocaml/js_set.cmi +0 -0
- package/lib/ocaml/js_set.cmt +0 -0
- package/lib/ocaml/js_set.ml +3 -0
- package/lib/ocaml/js_string.cmi +0 -0
- package/lib/ocaml/js_string.cmt +0 -0
- package/lib/ocaml/js_string.ml +914 -0
- package/lib/ocaml/js_string2.cmi +0 -0
- package/lib/ocaml/js_string2.cmt +0 -0
- package/lib/ocaml/js_string2.ml +912 -0
- package/lib/ocaml/js_typed_array.cmi +0 -0
- package/lib/ocaml/js_typed_array.cmt +0 -0
- package/lib/ocaml/js_typed_array.cppo.ml +429 -0
- package/lib/ocaml/js_typed_array.ml +1405 -0
- package/lib/ocaml/js_typed_array2.cmi +0 -0
- package/lib/ocaml/js_typed_array2.cmt +0 -0
- package/lib/ocaml/js_typed_array2.cppo.ml +296 -0
- package/lib/ocaml/js_typed_array2.ml +1269 -0
- package/lib/ocaml/js_types.cmi +0 -0
- package/lib/ocaml/js_types.cmt +0 -0
- package/lib/ocaml/js_types.cmti +0 -0
- package/lib/ocaml/js_types.ml +118 -0
- package/lib/ocaml/js_types.mli +78 -0
- package/lib/ocaml/js_undefined.cmi +0 -0
- package/lib/ocaml/js_undefined.cmt +0 -0
- package/lib/ocaml/js_undefined.cmti +0 -0
- package/lib/ocaml/js_undefined.ml +59 -0
- package/lib/ocaml/js_undefined.mli +92 -0
- package/lib/ocaml/js_vector.cmi +0 -0
- package/lib/ocaml/js_vector.cmt +0 -0
- package/lib/ocaml/js_vector.cmti +0 -0
- package/lib/ocaml/js_vector.ml +143 -0
- package/lib/ocaml/js_vector.mli +92 -0
- package/lib/ocaml/js_weakmap.cmi +0 -0
- package/lib/ocaml/js_weakmap.cmt +0 -0
- package/lib/ocaml/js_weakmap.ml +3 -0
- package/lib/ocaml/js_weakset.cmi +0 -0
- package/lib/ocaml/js_weakset.cmt +0 -0
- package/lib/ocaml/js_weakset.ml +3 -0
- package/lib/ocaml/jsx.cmi +0 -0
- package/lib/ocaml/jsx.cmt +0 -0
- package/lib/ocaml/jsx.ml +39 -0
- package/lib/ocaml/jsxDOM.cmi +0 -0
- package/lib/ocaml/jsxDOM.cmt +0 -0
- package/lib/ocaml/jsxDOM.ml +2087 -0
- package/lib/ocaml/jsxDOMStyle.cmi +0 -0
- package/lib/ocaml/jsxDOMStyle.cmt +0 -0
- package/lib/ocaml/jsxDOMStyle.ml +777 -0
- package/lib/ocaml/jsxEvent.cmi +0 -0
- package/lib/ocaml/jsxEvent.cmt +0 -0
- package/lib/ocaml/jsxEvent.ml +358 -0
- package/lib/ocaml/lazy.cmi +0 -0
- package/lib/ocaml/lazy.cmt +0 -0
- package/lib/ocaml/lazy.cmti +0 -0
- package/lib/ocaml/lazy.ml +70 -0
- package/lib/ocaml/lazy.mli +95 -0
- package/lib/ocaml/lexing.cmi +0 -0
- package/lib/ocaml/lexing.cmt +0 -0
- package/lib/ocaml/lexing.cmti +0 -0
- package/lib/ocaml/lexing.ml +230 -0
- package/lib/ocaml/lexing.mli +172 -0
- package/lib/ocaml/list.cmi +0 -0
- package/lib/ocaml/list.cmt +0 -0
- package/lib/ocaml/list.cmti +0 -0
- package/lib/ocaml/list.ml +485 -0
- package/lib/ocaml/list.mli +347 -0
- package/lib/ocaml/listLabels.cmi +0 -0
- package/lib/ocaml/listLabels.cmt +0 -0
- package/lib/ocaml/listLabels.cmti +0 -0
- package/lib/ocaml/listLabels.ml +485 -0
- package/lib/ocaml/listLabels.mli +353 -0
- package/lib/ocaml/map.cmi +0 -0
- package/lib/ocaml/map.cmt +0 -0
- package/lib/ocaml/map.cmti +0 -0
- package/lib/ocaml/map.cppo.ml +174 -0
- package/lib/ocaml/map.cppo.mli +191 -0
- package/lib/ocaml/map.ml +480 -0
- package/lib/ocaml/map.mli +315 -0
- package/lib/ocaml/mapLabels.cmi +0 -0
- package/lib/ocaml/mapLabels.cmt +0 -0
- package/lib/ocaml/mapLabels.ml +480 -0
- package/lib/ocaml/mapm.cppo.ml +177 -0
- package/lib/ocaml/mapm.cppo.mli +138 -0
- package/lib/ocaml/moreLabels.cmi +0 -0
- package/lib/ocaml/moreLabels.cmt +0 -0
- package/lib/ocaml/moreLabels.cmti +0 -0
- package/lib/ocaml/moreLabels.ml +22 -0
- package/lib/ocaml/moreLabels.mli +198 -0
- package/lib/ocaml/node.cmi +0 -0
- package/lib/ocaml/node.cmt +0 -0
- package/lib/ocaml/node.ml +84 -0
- package/lib/ocaml/node_buffer.cmi +0 -0
- package/lib/ocaml/node_buffer.cmt +0 -0
- package/lib/ocaml/node_buffer.ml +47 -0
- package/lib/ocaml/node_child_process.cmi +0 -0
- package/lib/ocaml/node_child_process.cmt +0 -0
- package/lib/ocaml/node_child_process.ml +50 -0
- package/lib/ocaml/node_fs.cmi +0 -0
- package/lib/ocaml/node_fs.cmt +0 -0
- package/lib/ocaml/node_fs.ml +153 -0
- package/lib/ocaml/node_module.cmi +0 -0
- package/lib/ocaml/node_module.cmt +0 -0
- package/lib/ocaml/node_module.ml +29 -0
- package/lib/ocaml/node_path.cmi +0 -0
- package/lib/ocaml/node_path.cmt +0 -0
- package/lib/ocaml/node_path.ml +71 -0
- package/lib/ocaml/node_process.cmi +0 -0
- package/lib/ocaml/node_process.cmt +0 -0
- package/lib/ocaml/node_process.cmti +0 -0
- package/lib/ocaml/node_process.ml +59 -0
- package/lib/ocaml/node_process.mli +48 -0
- package/lib/ocaml/obj.cmi +0 -0
- package/lib/ocaml/obj.cmt +0 -0
- package/lib/ocaml/obj.cmti +0 -0
- package/lib/ocaml/obj.ml +29 -0
- package/lib/ocaml/obj.mli +62 -0
- package/lib/ocaml/parsing.cmi +0 -0
- package/lib/ocaml/parsing.cmt +0 -0
- package/lib/ocaml/parsing.cmti +0 -0
- package/lib/ocaml/parsing.ml +212 -0
- package/lib/ocaml/parsing.mli +105 -0
- package/lib/ocaml/pervasives.cmi +0 -0
- package/lib/ocaml/pervasives.cmt +0 -0
- package/lib/ocaml/pervasives.cmti +0 -0
- package/lib/ocaml/pervasives.ml +297 -0
- package/lib/ocaml/pervasives.mli +771 -0
- package/lib/ocaml/printexc.cmi +0 -0
- package/lib/ocaml/printexc.cmt +0 -0
- package/lib/ocaml/printexc.cmti +0 -0
- package/lib/ocaml/printexc.ml +79 -0
- package/lib/ocaml/printexc.mli +57 -0
- package/lib/ocaml/queue.cmi +0 -0
- package/lib/ocaml/queue.cmt +0 -0
- package/lib/ocaml/queue.cmti +0 -0
- package/lib/ocaml/queue.ml +132 -0
- package/lib/ocaml/queue.mli +82 -0
- package/lib/ocaml/random.cmi +0 -0
- package/lib/ocaml/random.cmt +0 -0
- package/lib/ocaml/random.cmti +0 -0
- package/lib/ocaml/random.ml +273 -0
- package/lib/ocaml/random.mli +102 -0
- package/lib/ocaml/set.cmi +0 -0
- package/lib/ocaml/set.cmt +0 -0
- package/lib/ocaml/set.cmti +0 -0
- package/lib/ocaml/set.ml +526 -0
- package/lib/ocaml/set.mli +266 -0
- package/lib/ocaml/setLabels.cmi +0 -0
- package/lib/ocaml/setLabels.cmt +0 -0
- package/lib/ocaml/setLabels.ml +526 -0
- package/lib/ocaml/setm.cppo.ml +346 -0
- package/lib/ocaml/setm.cppo.mli +126 -0
- package/lib/ocaml/sort.cmi +0 -0
- package/lib/ocaml/sort.cmt +0 -0
- package/lib/ocaml/sort.cmti +0 -0
- package/lib/ocaml/sort.cppo.ml +267 -0
- package/lib/ocaml/sort.cppo.mli +96 -0
- package/lib/ocaml/sort.ml +99 -0
- package/lib/ocaml/sort.mli +44 -0
- package/lib/ocaml/stack.cmi +0 -0
- package/lib/ocaml/stack.cmt +0 -0
- package/lib/ocaml/stack.cmti +0 -0
- package/lib/ocaml/stack.ml +44 -0
- package/lib/ocaml/stack.mli +63 -0
- package/lib/ocaml/stdLabels.cmi +0 -0
- package/lib/ocaml/stdLabels.cmt +0 -0
- package/lib/ocaml/stdLabels.cmti +0 -0
- package/lib/ocaml/stdLabels.ml +24 -0
- package/lib/ocaml/stdLabels.mli +29 -0
- package/lib/ocaml/stream.cmi +0 -0
- package/lib/ocaml/stream.cmt +0 -0
- package/lib/ocaml/stream.cmti +0 -0
- package/lib/ocaml/stream.ml +213 -0
- package/lib/ocaml/stream.mli +108 -0
- package/lib/ocaml/string.cmi +0 -0
- package/lib/ocaml/string.cmt +0 -0
- package/lib/ocaml/string.cmti +0 -0
- package/lib/ocaml/string.ml +190 -0
- package/lib/ocaml/string.mli +286 -0
- package/lib/ocaml/stringLabels.cmi +0 -0
- package/lib/ocaml/stringLabels.cmt +0 -0
- package/lib/ocaml/stringLabels.cmti +0 -0
- package/lib/ocaml/stringLabels.ml +190 -0
- package/lib/ocaml/stringLabels.mli +241 -0
- package/lib/ocaml/sys.cmi +0 -0
- package/lib/ocaml/sys.cmt +0 -0
- package/lib/ocaml/sys.cmti +0 -0
- package/lib/ocaml/sys.ml +135 -0
- package/lib/ocaml/sys.mli +333 -0
- package/lib/ocaml/uchar.cmi +0 -0
- package/lib/ocaml/uchar.cmt +0 -0
- package/lib/ocaml/uchar.cmti +0 -0
- package/lib/ocaml/uchar.ml +58 -0
- package/lib/ocaml/uchar.mli +98 -0
- package/linux/bsb_helper.exe +0 -0
- package/linux/bsc.exe +0 -0
- package/linux/ninja.COPYING +202 -0
- package/linux/ninja.exe +0 -0
- package/linux/refmt.exe +0 -0
- package/linux/rescript.exe +0 -0
- package/openbsd/.keep +0 -0
- package/package.json +71 -0
- package/rescript +591 -0
- package/scripts/LICENSE.ml +27 -0
- package/scripts/bin_path.js +38 -0
- package/scripts/buckle_lto.js +55 -0
- package/scripts/build_sorted.ml +233 -0
- package/scripts/buildocaml.js +102 -0
- package/scripts/caml_oo_curry_gen.ml +71 -0
- package/scripts/checkUnused.js +63 -0
- package/scripts/ciTest.js +172 -0
- package/scripts/config.js +24 -0
- package/scripts/cover.sh +3 -0
- package/scripts/curry_gen.ml +167 -0
- package/scripts/dbg +13 -0
- package/scripts/dedupe.js +44 -0
- package/scripts/doc_gen.js +117 -0
- package/scripts/install.js +237 -0
- package/scripts/installUtils.js +61 -0
- package/scripts/js_internal_gen.js +135 -0
- package/scripts/jsconfig.json +12 -0
- package/scripts/littlecase.js +21 -0
- package/scripts/ninja.js +1980 -0
- package/scripts/ninjaFactory.js +36 -0
- package/scripts/pack.js +107 -0
- package/scripts/prebuilt.js +99 -0
- package/scripts/release.js +41 -0
- package/scripts/repl.js +151 -0
- package/scripts/rescript_arg.js +168 -0
- package/scripts/rescript_convert.js +128 -0
- package/scripts/rescript_dump.js +48 -0
- package/scripts/rescript_format.js +194 -0
- package/scripts/shake.js +138 -0
- package/scripts/tasks.js +149 -0
- package/scripts/test.sh +3 -0
- package/scripts/tmp.js +98 -0
- package/scripts/validate.js +41 -0
- package/vendor/ninja.tar.gz +0 -0
- package/vendor/ocaml.tar.gz +0 -0
- package/win32/bsb_helper.exe +0 -0
- package/win32/bsc.exe +0 -0
- package/win32/ninja.COPYING +202 -0
- package/win32/ninja.exe +0 -0
- package/win32/refmt.exe +0 -0
- package/win32/rescript.exe +0 -0
package/lib/ocaml/arg.ml
ADDED
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
(**************************************************************************)
|
|
2
|
+
(* *)
|
|
3
|
+
(* OCaml *)
|
|
4
|
+
(* *)
|
|
5
|
+
(* Damien Doligez, projet Para, INRIA Rocquencourt *)
|
|
6
|
+
(* *)
|
|
7
|
+
(* Copyright 1996 Institut National de Recherche en Informatique et *)
|
|
8
|
+
(* en Automatique. *)
|
|
9
|
+
(* *)
|
|
10
|
+
(* All rights reserved. This file is distributed under the terms of *)
|
|
11
|
+
(* the GNU Lesser General Public License version 2.1, with the *)
|
|
12
|
+
(* special exception on linking described in the file LICENSE. *)
|
|
13
|
+
(* *)
|
|
14
|
+
(**************************************************************************)
|
|
15
|
+
|
|
16
|
+
type key = string
|
|
17
|
+
type doc = string
|
|
18
|
+
type usage_msg = string
|
|
19
|
+
type anon_fun = (string -> unit)
|
|
20
|
+
|
|
21
|
+
type spec =
|
|
22
|
+
| Unit of (unit -> unit) (* Call the function with unit argument *)
|
|
23
|
+
| Bool of (bool -> unit) (* Call the function with a bool argument *)
|
|
24
|
+
| Set of bool ref (* Set the reference to true *)
|
|
25
|
+
| Clear of bool ref (* Set the reference to false *)
|
|
26
|
+
| String of (string -> unit) (* Call the function with a string argument *)
|
|
27
|
+
| Set_string of string ref (* Set the reference to the string argument *)
|
|
28
|
+
| Int of (int -> unit) (* Call the function with an int argument *)
|
|
29
|
+
| Set_int of int ref (* Set the reference to the int argument *)
|
|
30
|
+
| Float of (float -> unit) (* Call the function with a float argument *)
|
|
31
|
+
| Set_float of float ref (* Set the reference to the float argument *)
|
|
32
|
+
| Tuple of spec list (* Take several arguments according to the
|
|
33
|
+
spec list *)
|
|
34
|
+
| Symbol of string list * (string -> unit)
|
|
35
|
+
(* Take one of the symbols as argument and
|
|
36
|
+
call the function with the symbol. *)
|
|
37
|
+
| Rest of (string -> unit) (* Stop interpreting keywords and call the
|
|
38
|
+
function with each remaining argument *)
|
|
39
|
+
| Expand of (string -> string array) (* If the remaining arguments to process
|
|
40
|
+
are of the form
|
|
41
|
+
[["-foo"; "arg"] @ rest] where "foo" is
|
|
42
|
+
registered as [Expand f], then the
|
|
43
|
+
arguments [f "arg" @ rest] are
|
|
44
|
+
processed. Only allowed in
|
|
45
|
+
[parse_and_expand_argv_dynamic]. *)
|
|
46
|
+
|
|
47
|
+
exception Bad of string
|
|
48
|
+
exception Help of string
|
|
49
|
+
|
|
50
|
+
type error =
|
|
51
|
+
| Unknown of string
|
|
52
|
+
| Wrong of string * string * string (* option, actual, expected *)
|
|
53
|
+
| Missing of string
|
|
54
|
+
| Message of string
|
|
55
|
+
|
|
56
|
+
exception Stop of error (* used internally *)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
let rec assoc3 x l =
|
|
61
|
+
match l with
|
|
62
|
+
| [] -> raise Not_found
|
|
63
|
+
| (y1, y2, _) :: _ when y1 = x -> y2
|
|
64
|
+
| _ :: t -> assoc3 x t
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
let split s =
|
|
68
|
+
let i = String.index s '=' in
|
|
69
|
+
let len = String.length s in
|
|
70
|
+
String.sub s 0 i, String.sub s (i+1) (len-(i+1))
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
let make_symlist prefix sep suffix l =
|
|
74
|
+
match l with
|
|
75
|
+
| [] -> "<none>"
|
|
76
|
+
| h::t -> (List.fold_left (fun x y -> x ^ sep ^ y) (prefix ^ h) t) ^ suffix
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
let print_spec buf (key, spec, doc) =
|
|
80
|
+
if String.length doc > 0 then
|
|
81
|
+
match spec with
|
|
82
|
+
| Symbol (l, _) ->
|
|
83
|
+
let sym = make_symlist "{" "|" "}" l in
|
|
84
|
+
Buffer.add_string buf {j| $(key) $(sym)$(doc)\n|j}
|
|
85
|
+
| _ ->
|
|
86
|
+
Buffer.add_string buf {j| $(key) $(doc)\n|j}
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
let help_action () = raise (Stop (Unknown "-help"))
|
|
91
|
+
|
|
92
|
+
let add_help speclist =
|
|
93
|
+
let add1 =
|
|
94
|
+
try ignore (assoc3 "-help" speclist); []
|
|
95
|
+
with Not_found ->
|
|
96
|
+
["-help", Unit help_action, " Display this list of options"]
|
|
97
|
+
and add2 =
|
|
98
|
+
try ignore (assoc3 "--help" speclist); []
|
|
99
|
+
with Not_found ->
|
|
100
|
+
["--help", Unit help_action, " Display this list of options"]
|
|
101
|
+
in
|
|
102
|
+
speclist @ (add1 @ add2)
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
let usage_b buf speclist errmsg =
|
|
106
|
+
Buffer.add_string buf {j|$(errmsg)\n|j};
|
|
107
|
+
List.iter (print_spec buf) (add_help speclist)
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
let usage_string speclist errmsg =
|
|
111
|
+
let b = Buffer.create 200 in
|
|
112
|
+
usage_b b speclist errmsg;
|
|
113
|
+
Buffer.contents b
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
let usage speclist errmsg =
|
|
117
|
+
Js.log (usage_string speclist errmsg)
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
let current = ref 0
|
|
121
|
+
|
|
122
|
+
let bool_of_string_opt x =
|
|
123
|
+
try Some (bool_of_string x)
|
|
124
|
+
with Invalid_argument _ -> None
|
|
125
|
+
|
|
126
|
+
let int_of_string_opt x =
|
|
127
|
+
try Some (int_of_string x)
|
|
128
|
+
with Failure _ -> None
|
|
129
|
+
|
|
130
|
+
let float_of_string_opt x =
|
|
131
|
+
try Some (float_of_string x)
|
|
132
|
+
with Failure _ -> None
|
|
133
|
+
|
|
134
|
+
let parse_and_expand_argv_dynamic_aux allow_expand current argv speclist anonfun errmsg =
|
|
135
|
+
let initpos = !current in
|
|
136
|
+
let convert_error error =
|
|
137
|
+
(* convert an internal error to a Bad/Help exception
|
|
138
|
+
*or* add the program name as a prefix and the usage message as a suffix
|
|
139
|
+
to an user-raised Bad exception.
|
|
140
|
+
*)
|
|
141
|
+
let b = Buffer.create 200 in
|
|
142
|
+
let progname = if initpos < (Array.length !argv) then !argv.(initpos) else "(?)" in
|
|
143
|
+
begin match error with
|
|
144
|
+
| Unknown "-help" -> ()
|
|
145
|
+
| Unknown "--help" -> ()
|
|
146
|
+
| Unknown s ->
|
|
147
|
+
Buffer.add_string b {j|$(progname): unknown option '$(s)'.\n|j}
|
|
148
|
+
| Missing s ->
|
|
149
|
+
Buffer.add_string b {j|$(progname): option '$(s)' needs an argument.\n|j}
|
|
150
|
+
| Wrong (opt, arg, expected) ->
|
|
151
|
+
Buffer.add_string b {j|$(progname): wrong argument '$(arg)'; option '$(opt)' expects $(expected).\n|j}
|
|
152
|
+
| Message s -> (* user error message *)
|
|
153
|
+
Buffer.add_string b {j|$(progname): $(s).\n|j}
|
|
154
|
+
end;
|
|
155
|
+
usage_b b !speclist errmsg;
|
|
156
|
+
if error = Unknown "-help" || error = Unknown "--help"
|
|
157
|
+
then Help (Buffer.contents b)
|
|
158
|
+
else Bad (Buffer.contents b)
|
|
159
|
+
in
|
|
160
|
+
incr current;
|
|
161
|
+
while !current < (Array.length !argv) do
|
|
162
|
+
begin try
|
|
163
|
+
let s = !argv.(!current) in
|
|
164
|
+
if String.length s >= 1 && s.[0] = '-' then begin
|
|
165
|
+
let action, follow =
|
|
166
|
+
try assoc3 s !speclist, None
|
|
167
|
+
with Not_found ->
|
|
168
|
+
try
|
|
169
|
+
let keyword, arg = split s in
|
|
170
|
+
assoc3 keyword !speclist, Some arg
|
|
171
|
+
with Not_found -> raise (Stop (Unknown s))
|
|
172
|
+
in
|
|
173
|
+
let no_arg () =
|
|
174
|
+
match follow with
|
|
175
|
+
| None -> ()
|
|
176
|
+
| Some arg -> raise (Stop (Wrong (s, arg, "no argument"))) in
|
|
177
|
+
let get_arg () =
|
|
178
|
+
match follow with
|
|
179
|
+
| None ->
|
|
180
|
+
if !current + 1 < (Array.length !argv) then !argv.(!current + 1)
|
|
181
|
+
else raise (Stop (Missing s))
|
|
182
|
+
| Some arg -> arg
|
|
183
|
+
in
|
|
184
|
+
let consume_arg () =
|
|
185
|
+
match follow with
|
|
186
|
+
| None -> incr current
|
|
187
|
+
| Some _ -> ()
|
|
188
|
+
in
|
|
189
|
+
let rec treat_action = function
|
|
190
|
+
| Unit f -> f ();
|
|
191
|
+
| Bool f ->
|
|
192
|
+
let arg = get_arg () in
|
|
193
|
+
begin match bool_of_string_opt arg with
|
|
194
|
+
| None -> raise (Stop (Wrong (s, arg, "a boolean")))
|
|
195
|
+
| Some s -> f s
|
|
196
|
+
end;
|
|
197
|
+
consume_arg ();
|
|
198
|
+
| Set r -> no_arg (); r := true;
|
|
199
|
+
| Clear r -> no_arg (); r := false;
|
|
200
|
+
| String f ->
|
|
201
|
+
let arg = get_arg () in
|
|
202
|
+
f arg;
|
|
203
|
+
consume_arg ();
|
|
204
|
+
| Symbol (symb, f) ->
|
|
205
|
+
let arg = get_arg () in
|
|
206
|
+
if List.mem arg symb then begin
|
|
207
|
+
f arg;
|
|
208
|
+
consume_arg ();
|
|
209
|
+
end else begin
|
|
210
|
+
raise (Stop (Wrong (s, arg, "one of: "
|
|
211
|
+
^ (make_symlist "" " " "" symb))))
|
|
212
|
+
end
|
|
213
|
+
| Set_string r ->
|
|
214
|
+
r := get_arg ();
|
|
215
|
+
consume_arg ();
|
|
216
|
+
| Int f ->
|
|
217
|
+
let arg = get_arg () in
|
|
218
|
+
begin match int_of_string_opt arg with
|
|
219
|
+
| None -> raise (Stop (Wrong (s, arg, "an integer")))
|
|
220
|
+
| Some x -> f x
|
|
221
|
+
end;
|
|
222
|
+
consume_arg ();
|
|
223
|
+
| Set_int r ->
|
|
224
|
+
let arg = get_arg () in
|
|
225
|
+
begin match int_of_string_opt arg with
|
|
226
|
+
| None -> raise (Stop (Wrong (s, arg, "an integer")))
|
|
227
|
+
| Some x -> r := x
|
|
228
|
+
end;
|
|
229
|
+
consume_arg ();
|
|
230
|
+
| Float f ->
|
|
231
|
+
let arg = get_arg () in
|
|
232
|
+
begin match float_of_string_opt arg with
|
|
233
|
+
| None -> raise (Stop (Wrong (s, arg, "a float")))
|
|
234
|
+
| Some x -> f x
|
|
235
|
+
end;
|
|
236
|
+
consume_arg ();
|
|
237
|
+
| Set_float r ->
|
|
238
|
+
let arg = get_arg () in
|
|
239
|
+
begin match float_of_string_opt arg with
|
|
240
|
+
| None -> raise (Stop (Wrong (s, arg, "a float")))
|
|
241
|
+
| Some x -> r := x
|
|
242
|
+
end;
|
|
243
|
+
consume_arg ();
|
|
244
|
+
| Tuple specs ->
|
|
245
|
+
List.iter treat_action specs;
|
|
246
|
+
| Rest f ->
|
|
247
|
+
while !current < (Array.length !argv) - 1 do
|
|
248
|
+
f !argv.(!current + 1);
|
|
249
|
+
consume_arg ();
|
|
250
|
+
done;
|
|
251
|
+
| Expand f ->
|
|
252
|
+
if not allow_expand then
|
|
253
|
+
raise (Invalid_argument "Arg.Expand is is only allowed with Arg.parse_and_expand_argv_dynamic");
|
|
254
|
+
let arg = get_arg () in
|
|
255
|
+
let newarg = f arg in
|
|
256
|
+
consume_arg ();
|
|
257
|
+
let before = Array.sub !argv 0 (!current + 1)
|
|
258
|
+
and after = Array.sub !argv (!current + 1) ((Array.length !argv) - !current - 1) in
|
|
259
|
+
argv:= Array.concat [before;newarg;after];
|
|
260
|
+
in
|
|
261
|
+
treat_action action end
|
|
262
|
+
else anonfun s
|
|
263
|
+
with | Bad m -> raise (convert_error (Message m));
|
|
264
|
+
| Stop e -> raise (convert_error e);
|
|
265
|
+
end;
|
|
266
|
+
incr current
|
|
267
|
+
done
|
|
268
|
+
|
|
269
|
+
let parse_and_expand_argv_dynamic current argv speclist anonfun errmsg =
|
|
270
|
+
parse_and_expand_argv_dynamic_aux true current argv speclist anonfun errmsg
|
|
271
|
+
|
|
272
|
+
let parse_argv_dynamic ?(current=current) argv speclist anonfun errmsg =
|
|
273
|
+
parse_and_expand_argv_dynamic_aux false current (ref argv) speclist anonfun errmsg
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
let parse_argv ?(current=current) argv speclist anonfun errmsg =
|
|
277
|
+
parse_argv_dynamic ~current:current argv (ref speclist) anonfun errmsg
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
let parse l f msg =
|
|
281
|
+
try
|
|
282
|
+
parse_argv Sys.argv l f msg
|
|
283
|
+
with
|
|
284
|
+
| Bad msg -> Js.log msg; exit 2
|
|
285
|
+
| Help msg -> Js.log msg; exit 0
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
let parse_dynamic l f msg =
|
|
289
|
+
try
|
|
290
|
+
parse_argv_dynamic Sys.argv l f msg
|
|
291
|
+
with
|
|
292
|
+
| Bad msg -> Js.log msg; exit 2
|
|
293
|
+
| Help msg -> Js.log msg; exit 0
|
|
294
|
+
|
|
295
|
+
let parse_expand l f msg =
|
|
296
|
+
try
|
|
297
|
+
let argv = ref Sys.argv in
|
|
298
|
+
let spec = ref l in
|
|
299
|
+
let current = ref (!current) in
|
|
300
|
+
parse_and_expand_argv_dynamic current argv spec f msg
|
|
301
|
+
with
|
|
302
|
+
| Bad msg -> Js.log msg; exit 2
|
|
303
|
+
| Help msg -> Js.log msg; exit 0
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
let second_word s =
|
|
307
|
+
let len = String.length s in
|
|
308
|
+
let rec loop n =
|
|
309
|
+
if n >= len then len
|
|
310
|
+
else if s.[n] = ' ' then loop (n+1)
|
|
311
|
+
else n
|
|
312
|
+
in
|
|
313
|
+
match String.index s '\t' with
|
|
314
|
+
| n -> loop (n+1)
|
|
315
|
+
| exception Not_found ->
|
|
316
|
+
begin match String.index s ' ' with
|
|
317
|
+
| n -> loop (n+1)
|
|
318
|
+
| exception Not_found -> len
|
|
319
|
+
end
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
let max_arg_len cur (kwd, spec, doc) =
|
|
323
|
+
match spec with
|
|
324
|
+
| Symbol _ -> max cur (String.length kwd)
|
|
325
|
+
| _ -> max cur (String.length kwd + second_word doc)
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
let replace_leading_tab s =
|
|
329
|
+
let seen = ref false in
|
|
330
|
+
String.map (function '\t' when not !seen -> seen := true; ' ' | c -> c) s
|
|
331
|
+
|
|
332
|
+
let add_padding len ksd =
|
|
333
|
+
match ksd with
|
|
334
|
+
| (_, _, "") ->
|
|
335
|
+
(* Do not pad undocumented options, so that they still don't show up when
|
|
336
|
+
* run through [usage] or [parse]. *)
|
|
337
|
+
ksd
|
|
338
|
+
| (kwd, (Symbol _ as spec), msg) ->
|
|
339
|
+
let cutcol = second_word msg in
|
|
340
|
+
let spaces = String.make ((max 0 (len - cutcol)) + 3) ' ' in
|
|
341
|
+
(kwd, spec, "\n" ^ spaces ^ replace_leading_tab msg)
|
|
342
|
+
| (kwd, spec, msg) ->
|
|
343
|
+
let cutcol = second_word msg in
|
|
344
|
+
let kwd_len = String.length kwd in
|
|
345
|
+
let diff = len - kwd_len - cutcol in
|
|
346
|
+
if diff <= 0 then
|
|
347
|
+
(kwd, spec, replace_leading_tab msg)
|
|
348
|
+
else
|
|
349
|
+
let spaces = String.make diff ' ' in
|
|
350
|
+
let prefix = String.sub (replace_leading_tab msg) 0 cutcol in
|
|
351
|
+
let suffix = String.sub msg cutcol (String.length msg - cutcol) in
|
|
352
|
+
(kwd, spec, prefix ^ spaces ^ suffix)
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
let align ?(limit=max_int) speclist =
|
|
356
|
+
let completed = add_help speclist in
|
|
357
|
+
let len = List.fold_left max_arg_len 0 completed in
|
|
358
|
+
let len = min len limit in
|
|
359
|
+
List.map (add_padding len) completed
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
(**************************************************************************)
|
|
2
|
+
(* *)
|
|
3
|
+
(* OCaml *)
|
|
4
|
+
(* *)
|
|
5
|
+
(* Damien Doligez, projet Para, INRIA Rocquencourt *)
|
|
6
|
+
(* *)
|
|
7
|
+
(* Copyright 1996 Institut National de Recherche en Informatique et *)
|
|
8
|
+
(* en Automatique. *)
|
|
9
|
+
(* *)
|
|
10
|
+
(* All rights reserved. This file is distributed under the terms of *)
|
|
11
|
+
(* the GNU Lesser General Public License version 2.1, with the *)
|
|
12
|
+
(* special exception on linking described in the file LICENSE. *)
|
|
13
|
+
(* *)
|
|
14
|
+
(**************************************************************************)
|
|
15
|
+
|
|
16
|
+
(** Parsing of command line arguments.
|
|
17
|
+
|
|
18
|
+
This module provides a general mechanism for extracting options and
|
|
19
|
+
arguments from the command line to the program.
|
|
20
|
+
|
|
21
|
+
Syntax of command lines:
|
|
22
|
+
A keyword is a character string starting with a [-].
|
|
23
|
+
An option is a keyword alone or followed by an argument.
|
|
24
|
+
The types of keywords are: [Unit], [Bool], [Set], [Clear],
|
|
25
|
+
[String], [Set_string], [Int], [Set_int], [Float], [Set_float],
|
|
26
|
+
[Tuple], [Symbol], and [Rest].
|
|
27
|
+
[Unit], [Set] and [Clear] keywords take no argument. A [Rest]
|
|
28
|
+
keyword takes the remaining of the command line as arguments.
|
|
29
|
+
Every other keyword takes the following word on the command line
|
|
30
|
+
as argument. For compatibility with GNU getopt_long, [keyword=arg]
|
|
31
|
+
is also allowed.
|
|
32
|
+
Arguments not preceded by a keyword are called anonymous arguments.
|
|
33
|
+
|
|
34
|
+
Examples ([cmd] is assumed to be the command name):
|
|
35
|
+
- [cmd -flag ](a unit option)
|
|
36
|
+
- [cmd -int 1 ](an int option with argument [1])
|
|
37
|
+
- [cmd -string foobar ](a string option with argument ["foobar"])
|
|
38
|
+
- [cmd -float 12.34 ](a float option with argument [12.34])
|
|
39
|
+
- [cmd a b c ](three anonymous arguments: ["a"], ["b"], and ["c"])
|
|
40
|
+
- [cmd a b -- c d ](two anonymous arguments and a rest option with
|
|
41
|
+
two arguments)
|
|
42
|
+
*)
|
|
43
|
+
|
|
44
|
+
type spec =
|
|
45
|
+
| Unit of (unit -> unit) (** Call the function with unit argument *)
|
|
46
|
+
| Bool of (bool -> unit) (** Call the function with a bool argument *)
|
|
47
|
+
| Set of bool ref (** Set the reference to true *)
|
|
48
|
+
| Clear of bool ref (** Set the reference to false *)
|
|
49
|
+
| String of (string -> unit) (** Call the function with a string argument *)
|
|
50
|
+
| Set_string of string ref (** Set the reference to the string argument *)
|
|
51
|
+
| Int of (int -> unit) (** Call the function with an int argument *)
|
|
52
|
+
| Set_int of int ref (** Set the reference to the int argument *)
|
|
53
|
+
| Float of (float -> unit) (** Call the function with a float argument *)
|
|
54
|
+
| Set_float of float ref (** Set the reference to the float argument *)
|
|
55
|
+
| Tuple of spec list (** Take several arguments according to the
|
|
56
|
+
spec list *)
|
|
57
|
+
| Symbol of string list * (string -> unit)
|
|
58
|
+
(** Take one of the symbols as argument and
|
|
59
|
+
call the function with the symbol *)
|
|
60
|
+
| Rest of (string -> unit) (** Stop interpreting keywords and call the
|
|
61
|
+
function with each remaining argument *)
|
|
62
|
+
| Expand of (string -> string array) (** If the remaining arguments to process
|
|
63
|
+
are of the form
|
|
64
|
+
[["-foo"; "arg"] @ rest] where "foo" is
|
|
65
|
+
registered as [Expand f], then the
|
|
66
|
+
arguments [f "arg" @ rest] are
|
|
67
|
+
processed. Only allowed in
|
|
68
|
+
[parse_and_expand_argv_dynamic]. *)
|
|
69
|
+
(** The concrete type describing the behavior associated
|
|
70
|
+
with a keyword. *)
|
|
71
|
+
|
|
72
|
+
type key = string
|
|
73
|
+
type doc = string
|
|
74
|
+
type usage_msg = string
|
|
75
|
+
type anon_fun = (string -> unit)
|
|
76
|
+
|
|
77
|
+
val parse :
|
|
78
|
+
(key * spec * doc) list -> anon_fun -> usage_msg -> unit
|
|
79
|
+
(** [Arg.parse speclist anon_fun usage_msg] parses the command line.
|
|
80
|
+
[speclist] is a list of triples [(key, spec, doc)].
|
|
81
|
+
[key] is the option keyword, it must start with a ['-'] character.
|
|
82
|
+
[spec] gives the option type and the function to call when this option
|
|
83
|
+
is found on the command line.
|
|
84
|
+
[doc] is a one-line description of this option.
|
|
85
|
+
[anon_fun] is called on anonymous arguments.
|
|
86
|
+
The functions in [spec] and [anon_fun] are called in the same order
|
|
87
|
+
as their arguments appear on the command line.
|
|
88
|
+
|
|
89
|
+
If an error occurs, [Arg.parse] exits the program, after printing
|
|
90
|
+
to standard error an error message as follows:
|
|
91
|
+
- The reason for the error: unknown option, invalid or missing argument, etc.
|
|
92
|
+
- [usage_msg]
|
|
93
|
+
- The list of options, each followed by the corresponding [doc] string.
|
|
94
|
+
Beware: options that have an empty [doc] string will not be included in the
|
|
95
|
+
list.
|
|
96
|
+
|
|
97
|
+
For the user to be able to specify anonymous arguments starting with a
|
|
98
|
+
[-], include for example [("-", String anon_fun, doc)] in [speclist].
|
|
99
|
+
|
|
100
|
+
By default, [parse] recognizes two unit options, [-help] and [--help],
|
|
101
|
+
which will print to standard output [usage_msg] and the list of
|
|
102
|
+
options, and exit the program. You can override this behaviour
|
|
103
|
+
by specifying your own [-help] and [--help] options in [speclist].
|
|
104
|
+
*)
|
|
105
|
+
|
|
106
|
+
val parse_dynamic :
|
|
107
|
+
(key * spec * doc) list ref -> anon_fun -> usage_msg -> unit
|
|
108
|
+
(** Same as {!Arg.parse}, except that the [speclist] argument is a reference
|
|
109
|
+
and may be updated during the parsing. A typical use for this feature
|
|
110
|
+
is to parse command lines of the form:
|
|
111
|
+
- command subcommand [options]
|
|
112
|
+
where the list of options depends on the value of the subcommand argument.
|
|
113
|
+
@since 4.01.0
|
|
114
|
+
*)
|
|
115
|
+
|
|
116
|
+
val parse_argv : ?current: int ref -> string array ->
|
|
117
|
+
(key * spec * doc) list -> anon_fun -> usage_msg -> unit
|
|
118
|
+
(** [Arg.parse_argv ~current args speclist anon_fun usage_msg] parses
|
|
119
|
+
the array [args] as if it were the command line. It uses and updates
|
|
120
|
+
the value of [~current] (if given), or {!Arg.current}. You must set
|
|
121
|
+
it before calling [parse_argv]. The initial value of [current]
|
|
122
|
+
is the index of the program name (argument 0) in the array.
|
|
123
|
+
If an error occurs, [Arg.parse_argv] raises {!Arg.Bad} with
|
|
124
|
+
the error message as argument. If option [-help] or [--help] is
|
|
125
|
+
given, [Arg.parse_argv] raises {!Arg.Help} with the help message
|
|
126
|
+
as argument.
|
|
127
|
+
*)
|
|
128
|
+
|
|
129
|
+
val parse_argv_dynamic : ?current:int ref -> string array ->
|
|
130
|
+
(key * spec * doc) list ref -> anon_fun -> string -> unit
|
|
131
|
+
(** Same as {!Arg.parse_argv}, except that the [speclist] argument is a
|
|
132
|
+
reference and may be updated during the parsing.
|
|
133
|
+
See {!Arg.parse_dynamic}.
|
|
134
|
+
@since 4.01.0
|
|
135
|
+
*)
|
|
136
|
+
|
|
137
|
+
val parse_and_expand_argv_dynamic : int ref -> string array ref ->
|
|
138
|
+
(key * spec * doc) list ref -> anon_fun -> string -> unit
|
|
139
|
+
(** Same as {!Arg.parse_argv_dynamic}, except that the [argv] argument is a
|
|
140
|
+
reference and may be updated during the parsing of [Expand] arguments.
|
|
141
|
+
See {!Arg.parse_argv_dynamic}.
|
|
142
|
+
@since 4.05.0
|
|
143
|
+
*)
|
|
144
|
+
|
|
145
|
+
val parse_expand:
|
|
146
|
+
(key * spec * doc) list -> anon_fun -> usage_msg -> unit
|
|
147
|
+
(** Same as {!Arg.parse}, except that the [Expand] arguments are allowed and
|
|
148
|
+
the {!current} reference is not updated.
|
|
149
|
+
@since 4.05.0
|
|
150
|
+
*)
|
|
151
|
+
|
|
152
|
+
exception Help of string
|
|
153
|
+
(** Raised by [Arg.parse_argv] when the user asks for help. *)
|
|
154
|
+
|
|
155
|
+
exception Bad of string
|
|
156
|
+
(** Functions in [spec] or [anon_fun] can raise [Arg.Bad] with an error
|
|
157
|
+
message to reject invalid arguments.
|
|
158
|
+
[Arg.Bad] is also raised by {!Arg.parse_argv} in case of an error. *)
|
|
159
|
+
|
|
160
|
+
val usage : (key * spec * doc) list -> usage_msg -> unit
|
|
161
|
+
(** [Arg.usage speclist usage_msg] prints to standard error
|
|
162
|
+
an error message that includes the list of valid options. This is
|
|
163
|
+
the same message that {!Arg.parse} prints in case of error.
|
|
164
|
+
[speclist] and [usage_msg] are the same as for {!Arg.parse}. *)
|
|
165
|
+
|
|
166
|
+
val usage_string : (key * spec * doc) list -> usage_msg -> string
|
|
167
|
+
(** Returns the message that would have been printed by {!Arg.usage},
|
|
168
|
+
if provided with the same parameters. *)
|
|
169
|
+
|
|
170
|
+
val align: ?limit: int -> (key * spec * doc) list -> (key * spec * doc) list
|
|
171
|
+
(** Align the documentation strings by inserting spaces at the first alignment
|
|
172
|
+
separator (tab or, if tab is not found, space), according to the length of
|
|
173
|
+
the keyword. Use a alignment separator as the first character in a doc
|
|
174
|
+
string if you want to align the whole string. The doc strings corresponding
|
|
175
|
+
to [Symbol] arguments are aligned on the next line.
|
|
176
|
+
@param limit options with keyword and message longer than [limit] will not
|
|
177
|
+
be used to compute the alignment. *)
|
|
178
|
+
|
|
179
|
+
val current : int ref
|
|
180
|
+
(** Position (in {!Sys.argv}) of the argument being processed. You can
|
|
181
|
+
change this value, e.g. to force {!Arg.parse} to skip some arguments.
|
|
182
|
+
{!Arg.parse} uses the initial value of {!Arg.current} as the index of
|
|
183
|
+
argument 0 (the program name) and starts parsing arguments
|
|
184
|
+
at the next element. *)
|
|
185
|
+
|
|
Binary file
|
|
Binary file
|
|
Binary file
|