@tellahq/rescript 10.1.4-republish-2 → 10.1.4-republish-3
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/darwin/bsb_helper.exe +0 -0
- package/darwin/bsc.exe +0 -0
- package/darwin/ninja.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.exe +0 -0
- package/darwinarm64/rescript.exe +0 -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 +316 -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_promise2.cmi +0 -0
- package/lib/ocaml/js_promise2.cmt +0 -0
- package/lib/ocaml/js_promise2.res +58 -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.res +40 -0
- package/lib/ocaml/jsxDOM.cmi +0 -0
- package/lib/ocaml/jsxDOM.cmt +0 -0
- package/lib/ocaml/jsxDOM.res +620 -0
- package/lib/ocaml/jsxDOMStyle.cmi +0 -0
- package/lib/ocaml/jsxDOMStyle.cmt +0 -0
- package/lib/ocaml/jsxDOMStyle.ml +781 -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/jsxPPXReactSupport.cmi +0 -0
- package/lib/ocaml/jsxPPXReactSupport.cmt +0 -0
- package/lib/ocaml/jsxPPXReactSupport.res +48 -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 +75 -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.exe +0 -0
- package/linux/rescript.exe +0 -0
- package/ninja.COPYING +202 -0
- package/package.json +1 -1
- package/vendor/ninja.tar.gz +0 -0
- package/win32/bsb_helper.exe +0 -0
- package/win32/bsc.exe +0 -0
- package/win32/ninja.exe +0 -0
- package/win32/refmt.exe +0 -0
- package/win32/rescript.exe +0 -0
|
@@ -0,0 +1,771 @@
|
|
|
1
|
+
(**************************************************************************)
|
|
2
|
+
(* *)
|
|
3
|
+
(* OCaml *)
|
|
4
|
+
(* *)
|
|
5
|
+
(* Xavier Leroy, projet Cristal, 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
|
+
(** The initially opened module.
|
|
17
|
+
|
|
18
|
+
This module provides the basic operations over the built-in types
|
|
19
|
+
(numbers, booleans, byte sequences, strings, exceptions, references,
|
|
20
|
+
lists, arrays, input-output channels, ...).
|
|
21
|
+
|
|
22
|
+
This module is automatically opened at the beginning of each compilation.
|
|
23
|
+
All components of this module can therefore be referred by their short
|
|
24
|
+
name, without prefixing them by [Pervasives].
|
|
25
|
+
*)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
(* Internal *)
|
|
29
|
+
external __unsafe_cast : 'a -> 'b = "%identity"
|
|
30
|
+
|
|
31
|
+
(** {1 Exceptions} *)
|
|
32
|
+
|
|
33
|
+
external raise : exn -> 'a = "%raise"
|
|
34
|
+
(** Raise the given exception value *)
|
|
35
|
+
|
|
36
|
+
external raise_notrace : exn -> 'a = "%raise_notrace"
|
|
37
|
+
(** A faster version [raise] which does not record the backtrace.
|
|
38
|
+
@since 4.02.0
|
|
39
|
+
*)
|
|
40
|
+
|
|
41
|
+
val invalid_arg : string -> 'a
|
|
42
|
+
(** Raise exception [Invalid_argument] with the given string. *)
|
|
43
|
+
|
|
44
|
+
val failwith : string -> 'a
|
|
45
|
+
(** Raise exception [Failure] with the given string. *)
|
|
46
|
+
|
|
47
|
+
exception Exit
|
|
48
|
+
(** The [Exit] exception is not raised by any library function. It is
|
|
49
|
+
provided for use in your programs. *)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
(** {1 Comparisons} *)
|
|
53
|
+
|
|
54
|
+
external ( = ) : 'a -> 'a -> bool = "%equal"
|
|
55
|
+
(** [e1 = e2] tests for structural equality of [e1] and [e2].
|
|
56
|
+
Mutable structures (e.g. references and arrays) are equal
|
|
57
|
+
if and only if their current contents are structurally equal,
|
|
58
|
+
even if the two mutable objects are not the same physical object.
|
|
59
|
+
Equality between functional values raises [Invalid_argument].
|
|
60
|
+
Equality between cyclic data structures may not terminate.
|
|
61
|
+
Left-associative operator at precedence level 4/11. *)
|
|
62
|
+
|
|
63
|
+
external ( <> ) : 'a -> 'a -> bool = "%notequal"
|
|
64
|
+
(** Negation of {!Pervasives.( = )}.
|
|
65
|
+
Left-associative operator at precedence level 4/11. *)
|
|
66
|
+
|
|
67
|
+
external ( < ) : 'a -> 'a -> bool = "%lessthan"
|
|
68
|
+
(** See {!Pervasives.( >= )}.
|
|
69
|
+
Left-associative operator at precedence level 4/11. *)
|
|
70
|
+
|
|
71
|
+
external ( > ) : 'a -> 'a -> bool = "%greaterthan"
|
|
72
|
+
(** See {!Pervasives.( >= )}.
|
|
73
|
+
Left-associative operator at precedence level 4/11. *)
|
|
74
|
+
|
|
75
|
+
external ( <= ) : 'a -> 'a -> bool = "%lessequal"
|
|
76
|
+
(** See {!Pervasives.( >= )}.
|
|
77
|
+
Left-associative operator at precedence level 4/11. *)
|
|
78
|
+
|
|
79
|
+
external ( >= ) : 'a -> 'a -> bool = "%greaterequal"
|
|
80
|
+
(** Structural ordering functions. These functions coincide with
|
|
81
|
+
the usual orderings over integers, characters, strings, byte sequences
|
|
82
|
+
and floating-point numbers, and extend them to a
|
|
83
|
+
total ordering over all types.
|
|
84
|
+
The ordering is compatible with [( = )]. As in the case
|
|
85
|
+
of [( = )], mutable structures are compared by contents.
|
|
86
|
+
Comparison between functional values raises [Invalid_argument].
|
|
87
|
+
Comparison between cyclic structures may not terminate.
|
|
88
|
+
Left-associative operator at precedence level 4/11. *)
|
|
89
|
+
|
|
90
|
+
external compare : 'a -> 'a -> int = "%compare"
|
|
91
|
+
(** [compare x y] returns [0] if [x] is equal to [y],
|
|
92
|
+
a negative integer if [x] is less than [y], and a positive integer
|
|
93
|
+
if [x] is greater than [y]. The ordering implemented by [compare]
|
|
94
|
+
is compatible with the comparison predicates [=], [<] and [>]
|
|
95
|
+
defined above, with one difference on the treatment of the float value
|
|
96
|
+
{!Pervasives.nan}. Namely, the comparison predicates treat [nan]
|
|
97
|
+
as different from any other float value, including itself;
|
|
98
|
+
while [compare] treats [nan] as equal to itself and less than any
|
|
99
|
+
other float value. This treatment of [nan] ensures that [compare]
|
|
100
|
+
defines a total ordering relation.
|
|
101
|
+
|
|
102
|
+
[compare] applied to functional values may raise [Invalid_argument].
|
|
103
|
+
[compare] applied to cyclic structures may not terminate.
|
|
104
|
+
|
|
105
|
+
The [compare] function can be used as the comparison function
|
|
106
|
+
required by the {!Set.Make} and {!Map.Make} functors, as well as
|
|
107
|
+
the {!List.sort} and {!Array.sort} functions. *)
|
|
108
|
+
|
|
109
|
+
external min : 'a -> 'a -> 'a = "%bs_min"
|
|
110
|
+
(** Return the smaller of the two arguments.
|
|
111
|
+
The result is unspecified if one of the arguments contains
|
|
112
|
+
the float value [nan]. *)
|
|
113
|
+
|
|
114
|
+
external max : 'a -> 'a -> 'a = "%bs_max"
|
|
115
|
+
(** Return the greater of the two arguments.
|
|
116
|
+
The result is unspecified if one of the arguments contains
|
|
117
|
+
the float value [nan]. *)
|
|
118
|
+
|
|
119
|
+
external ( == ) : 'a -> 'a -> bool = "%eq"
|
|
120
|
+
(** [e1 == e2] tests for physical equality of [e1] and [e2].
|
|
121
|
+
On mutable types such as references, arrays, byte sequences, records with
|
|
122
|
+
mutable fields and objects with mutable instance variables,
|
|
123
|
+
[e1 == e2] is true if and only if physical modification of [e1]
|
|
124
|
+
also affects [e2].
|
|
125
|
+
On non-mutable types, the behavior of [( == )] is
|
|
126
|
+
implementation-dependent; however, it is guaranteed that
|
|
127
|
+
[e1 == e2] implies [compare e1 e2 = 0].
|
|
128
|
+
Left-associative operator at precedence level 4/11. *)
|
|
129
|
+
|
|
130
|
+
external ( != ) : 'a -> 'a -> bool = "%noteq"
|
|
131
|
+
(** Negation of {!Pervasives.( == )}.
|
|
132
|
+
Left-associative operator at precedence level 4/11. *)
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
(** {1 Boolean operations} *)
|
|
136
|
+
|
|
137
|
+
external not : bool -> bool = "%boolnot"
|
|
138
|
+
(** The boolean negation. *)
|
|
139
|
+
|
|
140
|
+
external ( && ) : bool -> bool -> bool = "%sequand"
|
|
141
|
+
(** The boolean 'and'. Evaluation is sequential, left-to-right:
|
|
142
|
+
in [e1 && e2], [e1] is evaluated first, and if it returns [false],
|
|
143
|
+
[e2] is not evaluated at all.
|
|
144
|
+
Right-associative operator at precedence level 3/11. *)
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
external ( || ) : bool -> bool -> bool = "%sequor"
|
|
148
|
+
(** The boolean 'or'. Evaluation is sequential, left-to-right:
|
|
149
|
+
in [e1 || e2], [e1] is evaluated first, and if it returns [true],
|
|
150
|
+
[e2] is not evaluated at all.
|
|
151
|
+
Right-associative operator at precedence level 2/11.
|
|
152
|
+
*)
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
(** {1 Debugging} *)
|
|
156
|
+
|
|
157
|
+
external __LOC__ : string = "%loc_LOC"
|
|
158
|
+
(** [__LOC__] returns the location at which this expression appears in
|
|
159
|
+
the file currently being parsed by the compiler, with the standard
|
|
160
|
+
error format of OCaml: "File %S, line %d, characters %d-%d".
|
|
161
|
+
@since 4.02.0
|
|
162
|
+
*)
|
|
163
|
+
|
|
164
|
+
external __FILE__ : string = "%loc_FILE"
|
|
165
|
+
(** [__FILE__] returns the name of the file currently being
|
|
166
|
+
parsed by the compiler.
|
|
167
|
+
@since 4.02.0
|
|
168
|
+
*)
|
|
169
|
+
|
|
170
|
+
external __LINE__ : int = "%loc_LINE"
|
|
171
|
+
(** [__LINE__] returns the line number at which this expression
|
|
172
|
+
appears in the file currently being parsed by the compiler.
|
|
173
|
+
@since 4.02.0
|
|
174
|
+
*)
|
|
175
|
+
|
|
176
|
+
external __MODULE__ : string = "%loc_MODULE"
|
|
177
|
+
(** [__MODULE__] returns the module name of the file being
|
|
178
|
+
parsed by the compiler.
|
|
179
|
+
@since 4.02.0
|
|
180
|
+
*)
|
|
181
|
+
|
|
182
|
+
external __POS__ : string * int * int * int = "%loc_POS"
|
|
183
|
+
(** [__POS__] returns a tuple [(file,lnum,cnum,enum)], corresponding
|
|
184
|
+
to the location at which this expression appears in the file
|
|
185
|
+
currently being parsed by the compiler. [file] is the current
|
|
186
|
+
filename, [lnum] the line number, [cnum] the character position in
|
|
187
|
+
the line and [enum] the last character position in the line.
|
|
188
|
+
@since 4.02.0
|
|
189
|
+
*)
|
|
190
|
+
|
|
191
|
+
external __LOC_OF__ : 'a -> string * 'a = "%loc_LOC"
|
|
192
|
+
(** [__LOC_OF__ expr] returns a pair [(loc, expr)] where [loc] is the
|
|
193
|
+
location of [expr] in the file currently being parsed by the
|
|
194
|
+
compiler, with the standard error format of OCaml: "File %S, line
|
|
195
|
+
%d, characters %d-%d".
|
|
196
|
+
@since 4.02.0
|
|
197
|
+
*)
|
|
198
|
+
|
|
199
|
+
external __LINE_OF__ : 'a -> int * 'a = "%loc_LINE"
|
|
200
|
+
(** [__LINE__ expr] returns a pair [(line, expr)], where [line] is the
|
|
201
|
+
line number at which the expression [expr] appears in the file
|
|
202
|
+
currently being parsed by the compiler.
|
|
203
|
+
@since 4.02.0
|
|
204
|
+
*)
|
|
205
|
+
|
|
206
|
+
external __POS_OF__ : 'a -> (string * int * int * int) * 'a = "%loc_POS"
|
|
207
|
+
(** [__POS_OF__ expr] returns a pair [(loc,expr)], where [loc] is a
|
|
208
|
+
tuple [(file,lnum,cnum,enum)] corresponding to the location at
|
|
209
|
+
which the expression [expr] appears in the file currently being
|
|
210
|
+
parsed by the compiler. [file] is the current filename, [lnum] the
|
|
211
|
+
line number, [cnum] the character position in the line and [enum]
|
|
212
|
+
the last character position in the line.
|
|
213
|
+
@since 4.02.0
|
|
214
|
+
*)
|
|
215
|
+
|
|
216
|
+
(** {1 Composition operators} *)
|
|
217
|
+
|
|
218
|
+
external ( |> ) : 'a -> ('a -> 'b) -> 'b = "%revapply"
|
|
219
|
+
(** Reverse-application operator: [x |> f |> g] is exactly equivalent
|
|
220
|
+
to [g (f (x))].
|
|
221
|
+
Left-associative operator at precedence level 4/11.
|
|
222
|
+
@since 4.01
|
|
223
|
+
*)
|
|
224
|
+
|
|
225
|
+
external ( @@ ) : ('a -> 'b) -> 'a -> 'b = "%apply"
|
|
226
|
+
(** Application operator: [g @@ f @@ x] is exactly equivalent to
|
|
227
|
+
[g (f (x))].
|
|
228
|
+
Right-associative operator at precedence level 5/11.
|
|
229
|
+
@since 4.01
|
|
230
|
+
*)
|
|
231
|
+
|
|
232
|
+
(** {1 Integer arithmetic} *)
|
|
233
|
+
|
|
234
|
+
(** Integers are 31 bits wide (or 63 bits on 64-bit processors).
|
|
235
|
+
All operations are taken modulo 2{^31} (or 2{^63}).
|
|
236
|
+
They do not fail on overflow. *)
|
|
237
|
+
|
|
238
|
+
external ( ~- ) : int -> int = "%negint"
|
|
239
|
+
(** Unary negation. You can also write [- e] instead of [~- e].
|
|
240
|
+
Unary operator at precedence level 9/11 for [- e]
|
|
241
|
+
and 11/11 for [~- e]. *)
|
|
242
|
+
|
|
243
|
+
external ( ~+ ) : int -> int = "%identity"
|
|
244
|
+
(** Unary addition. You can also write [+ e] instead of [~+ e].
|
|
245
|
+
Unary operator at precedence level 9/11 for [+ e]
|
|
246
|
+
and 11/11 for [~+ e].
|
|
247
|
+
@since 3.12.0
|
|
248
|
+
*)
|
|
249
|
+
|
|
250
|
+
external succ : int -> int = "%succint"
|
|
251
|
+
(** [succ x] is [x + 1]. *)
|
|
252
|
+
|
|
253
|
+
external pred : int -> int = "%predint"
|
|
254
|
+
(** [pred x] is [x - 1]. *)
|
|
255
|
+
|
|
256
|
+
external ( + ) : int -> int -> int = "%addint"
|
|
257
|
+
(** Integer addition.
|
|
258
|
+
Left-associative operator at precedence level 6/11. *)
|
|
259
|
+
|
|
260
|
+
external ( - ) : int -> int -> int = "%subint"
|
|
261
|
+
(** Integer subtraction.
|
|
262
|
+
Left-associative operator at precedence level 6/11. *)
|
|
263
|
+
|
|
264
|
+
external ( * ) : int -> int -> int = "%mulint"
|
|
265
|
+
(** Integer multiplication.
|
|
266
|
+
Left-associative operator at precedence level 7/11. *)
|
|
267
|
+
|
|
268
|
+
external ( / ) : int -> int -> int = "%divint"
|
|
269
|
+
(** Integer division.
|
|
270
|
+
Raise [Division_by_zero] if the second argument is 0.
|
|
271
|
+
Integer division rounds the real quotient of its arguments towards zero.
|
|
272
|
+
More precisely, if [x >= 0] and [y > 0], [x / y] is the greatest integer
|
|
273
|
+
less than or equal to the real quotient of [x] by [y]. Moreover,
|
|
274
|
+
[(- x) / y = x / (- y) = - (x / y)].
|
|
275
|
+
Left-associative operator at precedence level 7/11. *)
|
|
276
|
+
|
|
277
|
+
external ( mod ) : int -> int -> int = "%modint"
|
|
278
|
+
(** Integer remainder. If [y] is not zero, the result
|
|
279
|
+
of [x mod y] satisfies the following properties:
|
|
280
|
+
[x = (x / y) * y + x mod y] and
|
|
281
|
+
[abs(x mod y) <= abs(y) - 1].
|
|
282
|
+
If [y = 0], [x mod y] raises [Division_by_zero].
|
|
283
|
+
Note that [x mod y] is negative only if [x < 0].
|
|
284
|
+
Raise [Division_by_zero] if [y] is zero.
|
|
285
|
+
Left-associative operator at precedence level 7/11. *)
|
|
286
|
+
|
|
287
|
+
val abs : int -> int
|
|
288
|
+
(** Return the absolute value of the argument. Note that this may be
|
|
289
|
+
negative if the argument is [min_int]. *)
|
|
290
|
+
|
|
291
|
+
val max_int : int
|
|
292
|
+
(** The greatest representable integer. *)
|
|
293
|
+
|
|
294
|
+
val min_int : int
|
|
295
|
+
(** The smallest representable integer. *)
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
(** {2 Bitwise operations} *)
|
|
299
|
+
|
|
300
|
+
external ( land ) : int -> int -> int = "%andint"
|
|
301
|
+
(** Bitwise logical and.
|
|
302
|
+
Left-associative operator at precedence level 7/11. *)
|
|
303
|
+
|
|
304
|
+
external ( lor ) : int -> int -> int = "%orint"
|
|
305
|
+
(** Bitwise logical or.
|
|
306
|
+
Left-associative operator at precedence level 7/11. *)
|
|
307
|
+
|
|
308
|
+
external ( lxor ) : int -> int -> int = "%xorint"
|
|
309
|
+
(** Bitwise logical exclusive or.
|
|
310
|
+
Left-associative operator at precedence level 7/11. *)
|
|
311
|
+
|
|
312
|
+
val lnot : int -> int
|
|
313
|
+
(** Bitwise logical negation. *)
|
|
314
|
+
|
|
315
|
+
external ( lsl ) : int -> int -> int = "%lslint"
|
|
316
|
+
(** [n lsl m] shifts [n] to the left by [m] bits.
|
|
317
|
+
The result is unspecified if [m < 0] or [m >= bitsize],
|
|
318
|
+
where [bitsize] is [32] on a 32-bit platform and
|
|
319
|
+
[64] on a 64-bit platform.
|
|
320
|
+
Right-associative operator at precedence level 8/11. *)
|
|
321
|
+
|
|
322
|
+
external ( lsr ) : int -> int -> int = "%lsrint"
|
|
323
|
+
(** [n lsr m] shifts [n] to the right by [m] bits.
|
|
324
|
+
This is a logical shift: zeroes are inserted regardless of
|
|
325
|
+
the sign of [n].
|
|
326
|
+
The result is unspecified if [m < 0] or [m >= bitsize].
|
|
327
|
+
Right-associative operator at precedence level 8/11. *)
|
|
328
|
+
|
|
329
|
+
external ( asr ) : int -> int -> int = "%asrint"
|
|
330
|
+
(** [n asr m] shifts [n] to the right by [m] bits.
|
|
331
|
+
This is an arithmetic shift: the sign bit of [n] is replicated.
|
|
332
|
+
The result is unspecified if [m < 0] or [m >= bitsize].
|
|
333
|
+
Right-associative operator at precedence level 8/11. *)
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
(** {1 Floating-point arithmetic}
|
|
337
|
+
|
|
338
|
+
OCaml's floating-point numbers follow the
|
|
339
|
+
IEEE 754 standard, using double precision (64 bits) numbers.
|
|
340
|
+
Floating-point operations never raise an exception on overflow,
|
|
341
|
+
underflow, division by zero, etc. Instead, special IEEE numbers
|
|
342
|
+
are returned as appropriate, such as [infinity] for [1.0 /. 0.0],
|
|
343
|
+
[neg_infinity] for [-1.0 /. 0.0], and [nan] ('not a number')
|
|
344
|
+
for [0.0 /. 0.0]. These special numbers then propagate through
|
|
345
|
+
floating-point computations as expected: for instance,
|
|
346
|
+
[1.0 /. infinity] is [0.0], and any arithmetic operation with [nan]
|
|
347
|
+
as argument returns [nan] as result.
|
|
348
|
+
*)
|
|
349
|
+
|
|
350
|
+
external ( ~-. ) : float -> float = "%negfloat"
|
|
351
|
+
(** Unary negation. You can also write [-. e] instead of [~-. e].
|
|
352
|
+
Unary operator at precedence level 9/11 for [-. e]
|
|
353
|
+
and 11/11 for [~-. e]. *)
|
|
354
|
+
|
|
355
|
+
external ( ~+. ) : float -> float = "%identity"
|
|
356
|
+
(** Unary addition. You can also write [+. e] instead of [~+. e].
|
|
357
|
+
Unary operator at precedence level 9/11 for [+. e]
|
|
358
|
+
and 11/11 for [~+. e].
|
|
359
|
+
@since 3.12.0
|
|
360
|
+
*)
|
|
361
|
+
|
|
362
|
+
external ( +. ) : float -> float -> float = "%addfloat"
|
|
363
|
+
(** Floating-point addition.
|
|
364
|
+
Left-associative operator at precedence level 6/11. *)
|
|
365
|
+
|
|
366
|
+
external ( -. ) : float -> float -> float = "%subfloat"
|
|
367
|
+
(** Floating-point subtraction.
|
|
368
|
+
Left-associative operator at precedence level 6/11. *)
|
|
369
|
+
|
|
370
|
+
external ( *. ) : float -> float -> float = "%mulfloat"
|
|
371
|
+
(** Floating-point multiplication.
|
|
372
|
+
Left-associative operator at precedence level 7/11. *)
|
|
373
|
+
|
|
374
|
+
external ( /. ) : float -> float -> float = "%divfloat"
|
|
375
|
+
(** Floating-point division.
|
|
376
|
+
Left-associative operator at precedence level 7/11. *)
|
|
377
|
+
|
|
378
|
+
external ( ** ) : float -> float -> float = "pow" [@@bs.val] [@@bs.scope "Math"]
|
|
379
|
+
(** Exponentiation. *)
|
|
380
|
+
|
|
381
|
+
external sqrt : float -> float = "sqrt" [@@bs.val] [@@bs.scope "Math"]
|
|
382
|
+
(** Square root. *)
|
|
383
|
+
|
|
384
|
+
external exp : float -> float = "exp" [@@bs.val] [@@bs.scope "Math"]
|
|
385
|
+
(** Exponential. *)
|
|
386
|
+
|
|
387
|
+
external log : float -> float = "log" [@@bs.val] [@@bs.scope "Math"]
|
|
388
|
+
(** Natural logarithm. *)
|
|
389
|
+
|
|
390
|
+
external log10 : float -> float = "log10" [@@bs.val] [@@bs.scope "Math"]
|
|
391
|
+
(** Base 10 logarithm. *)
|
|
392
|
+
|
|
393
|
+
external expm1 : float -> float = "?expm1_float"
|
|
394
|
+
(** [expm1 x] computes [exp x -. 1.0], giving numerically-accurate results
|
|
395
|
+
even if [x] is close to [0.0].
|
|
396
|
+
@since 3.12.0
|
|
397
|
+
*)
|
|
398
|
+
|
|
399
|
+
external log1p : float -> float = "log1p" [@@bs.val] [@@bs.scope "Math"]
|
|
400
|
+
(** [log1p x] computes [log(1.0 +. x)] (natural logarithm),
|
|
401
|
+
giving numerically-accurate results even if [x] is close to [0.0].
|
|
402
|
+
@since 3.12.0
|
|
403
|
+
*)
|
|
404
|
+
|
|
405
|
+
external cos : float -> float = "cos" [@@bs.val] [@@bs.scope "Math"]
|
|
406
|
+
(** Cosine. Argument is in radians. *)
|
|
407
|
+
|
|
408
|
+
external sin : float -> float = "sin" [@@bs.val] [@@bs.scope "Math"]
|
|
409
|
+
(** Sine. Argument is in radians. *)
|
|
410
|
+
|
|
411
|
+
external tan : float -> float = "tan" [@@bs.val] [@@bs.scope "Math"]
|
|
412
|
+
(** Tangent. Argument is in radians. *)
|
|
413
|
+
|
|
414
|
+
external acos : float -> float = "acos" [@@bs.val] [@@bs.scope "Math"]
|
|
415
|
+
(** Arc cosine. The argument must fall within the range [[-1.0, 1.0]].
|
|
416
|
+
Result is in radians and is between [0.0] and [pi]. *)
|
|
417
|
+
|
|
418
|
+
external asin : float -> float = "asin" [@@bs.val] [@@bs.scope "Math"]
|
|
419
|
+
(** Arc sine. The argument must fall within the range [[-1.0, 1.0]].
|
|
420
|
+
Result is in radians and is between [-pi/2] and [pi/2]. *)
|
|
421
|
+
|
|
422
|
+
external atan : float -> float = "atan" [@@bs.val] [@@bs.scope "Math"]
|
|
423
|
+
(** Arc tangent.
|
|
424
|
+
Result is in radians and is between [-pi/2] and [pi/2]. *)
|
|
425
|
+
|
|
426
|
+
external atan2 : float -> float -> float = "atan2" [@@bs.val] [@@bs.scope "Math"]
|
|
427
|
+
(** [atan2 y x] returns the arc tangent of [y /. x]. The signs of [x]
|
|
428
|
+
and [y] are used to determine the quadrant of the result.
|
|
429
|
+
Result is in radians and is between [-pi] and [pi]. *)
|
|
430
|
+
|
|
431
|
+
external hypot : float -> float -> float
|
|
432
|
+
= "?hypot_float"
|
|
433
|
+
(** [hypot x y] returns [sqrt(x *. x + y *. y)], that is, the length
|
|
434
|
+
of the hypotenuse of a right-angled triangle with sides of length
|
|
435
|
+
[x] and [y], or, equivalently, the distance of the point [(x,y)]
|
|
436
|
+
to origin.
|
|
437
|
+
@since 4.00.0 *)
|
|
438
|
+
|
|
439
|
+
external cosh : float -> float = "cosh" [@@bs.val] [@@bs.scope "Math"]
|
|
440
|
+
(** Hyperbolic cosine. Argument is in radians. *)
|
|
441
|
+
|
|
442
|
+
external sinh : float -> float = "sinh" [@@bs.val] [@@bs.scope "Math"]
|
|
443
|
+
(** Hyperbolic sine. Argument is in radians. *)
|
|
444
|
+
|
|
445
|
+
external tanh : float -> float = "tanh" [@@bs.val] [@@bs.scope "Math"]
|
|
446
|
+
(** Hyperbolic tangent. Argument is in radians. *)
|
|
447
|
+
|
|
448
|
+
external ceil : float -> float = "ceil" [@@bs.val] [@@bs.scope "Math"]
|
|
449
|
+
(** Round above to an integer value.
|
|
450
|
+
[ceil f] returns the least integer value greater than or equal to [f].
|
|
451
|
+
The result is returned as a float. *)
|
|
452
|
+
|
|
453
|
+
external floor : float -> float = "floor" [@@bs.val] [@@bs.scope "Math"]
|
|
454
|
+
(** Round below to an integer value.
|
|
455
|
+
[floor f] returns the greatest integer value less than or
|
|
456
|
+
equal to [f].
|
|
457
|
+
The result is returned as a float. *)
|
|
458
|
+
|
|
459
|
+
external abs_float : float -> float = "abs" [@@bs.val] [@@bs.scope "Math"]
|
|
460
|
+
(** [abs_float f] returns the absolute value of [f]. *)
|
|
461
|
+
|
|
462
|
+
external copysign : float -> float -> float
|
|
463
|
+
= "?copysign_float"
|
|
464
|
+
(** [copysign x y] returns a float whose absolute value is that of [x]
|
|
465
|
+
and whose sign is that of [y]. If [x] is [nan], returns [nan].
|
|
466
|
+
If [y] is [nan], returns either [x] or [-. x], but it is not
|
|
467
|
+
specified which.
|
|
468
|
+
@since 4.00.0 *)
|
|
469
|
+
|
|
470
|
+
external mod_float : float -> float -> float = "?fmod_float"
|
|
471
|
+
(** [mod_float a b] returns the remainder of [a] with respect to
|
|
472
|
+
[b]. The returned value is [a -. n *. b], where [n]
|
|
473
|
+
is the quotient [a /. b] rounded towards zero to an integer. *)
|
|
474
|
+
|
|
475
|
+
external frexp : float -> float * int = "?frexp_float"
|
|
476
|
+
(** [frexp f] returns the pair of the significant
|
|
477
|
+
and the exponent of [f]. When [f] is zero, the
|
|
478
|
+
significant [x] and the exponent [n] of [f] are equal to
|
|
479
|
+
zero. When [f] is non-zero, they are defined by
|
|
480
|
+
[f = x *. 2 ** n] and [0.5 <= x < 1.0]. *)
|
|
481
|
+
|
|
482
|
+
|
|
483
|
+
external ldexp : float -> int -> float =
|
|
484
|
+
"?ldexp_float"
|
|
485
|
+
(** [ldexp x n] returns [x *. 2 ** n]. *)
|
|
486
|
+
|
|
487
|
+
external modf : float -> float * float = "?modf_float"
|
|
488
|
+
(** [modf f] returns the pair of the fractional and integral
|
|
489
|
+
part of [f]. *)
|
|
490
|
+
|
|
491
|
+
external float : int -> float = "%floatofint"
|
|
492
|
+
(** Same as {!Pervasives.float_of_int}. *)
|
|
493
|
+
|
|
494
|
+
external float_of_int : int -> float = "%floatofint"
|
|
495
|
+
(** Convert an integer to floating-point. *)
|
|
496
|
+
|
|
497
|
+
external truncate : float -> int = "%intoffloat"
|
|
498
|
+
(** Same as {!Pervasives.int_of_float}. *)
|
|
499
|
+
|
|
500
|
+
external int_of_float : float -> int = "%intoffloat"
|
|
501
|
+
(** Truncate the given floating-point number to an integer.
|
|
502
|
+
The result is unspecified if the argument is [nan] or falls outside the
|
|
503
|
+
range of representable integers. *)
|
|
504
|
+
|
|
505
|
+
val infinity : float
|
|
506
|
+
(** Positive infinity. *)
|
|
507
|
+
|
|
508
|
+
val neg_infinity : float
|
|
509
|
+
(** Negative infinity. *)
|
|
510
|
+
|
|
511
|
+
|
|
512
|
+
external nan : float = "NaN" [@@bs.val] [@@bs.scope "Number"]
|
|
513
|
+
(* we could also use [0. /. 0.] *)
|
|
514
|
+
(** A special floating-point value denoting the result of an
|
|
515
|
+
undefined operation such as [0.0 /. 0.0]. Stands for
|
|
516
|
+
'not a number'. Any floating-point operation with [nan] as
|
|
517
|
+
argument returns [nan] as result. As for floating-point comparisons,
|
|
518
|
+
[=], [<], [<=], [>] and [>=] return [false] and [<>] returns [true]
|
|
519
|
+
if one or both of their arguments is [nan]. *)
|
|
520
|
+
|
|
521
|
+
val max_float : float
|
|
522
|
+
(** The largest positive finite value of type [float]. *)
|
|
523
|
+
|
|
524
|
+
val min_float : float
|
|
525
|
+
(** The smallest positive, non-zero, non-denormalized value of type [float]. *)
|
|
526
|
+
|
|
527
|
+
val epsilon_float : float
|
|
528
|
+
(** The difference between [1.0] and the smallest exactly representable
|
|
529
|
+
floating-point number greater than [1.0]. *)
|
|
530
|
+
|
|
531
|
+
|
|
532
|
+
type fpclass =
|
|
533
|
+
FP_normal (** Normal number, none of the below *)
|
|
534
|
+
| FP_subnormal (** Number very close to 0.0, has reduced precision *)
|
|
535
|
+
| FP_zero (** Number is 0.0 or -0.0 *)
|
|
536
|
+
| FP_infinite (** Number is positive or negative infinity *)
|
|
537
|
+
| FP_nan (** Not a number: result of an undefined operation *)
|
|
538
|
+
(** The five classes of floating-point numbers, as determined by
|
|
539
|
+
the {!Pervasives.classify_float} function. *)
|
|
540
|
+
|
|
541
|
+
val classify_float : float -> fpclass
|
|
542
|
+
(** Return the class of the given floating-point number:
|
|
543
|
+
normal, subnormal, zero, infinite, or not a number. *)
|
|
544
|
+
|
|
545
|
+
|
|
546
|
+
(** {1 String operations}
|
|
547
|
+
|
|
548
|
+
More string operations are provided in module {!String}.
|
|
549
|
+
*)
|
|
550
|
+
external (^) : string -> string -> string = "#string_append"
|
|
551
|
+
(** String concatenation.
|
|
552
|
+
Right-associative operator at precedence level 5/11. *)
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
(** {1 Character operations}
|
|
556
|
+
|
|
557
|
+
More character operations are provided in module {!Char}.
|
|
558
|
+
*)
|
|
559
|
+
|
|
560
|
+
external int_of_char : char -> int = "%identity"
|
|
561
|
+
(** Return the ASCII code of the argument. *)
|
|
562
|
+
|
|
563
|
+
val char_of_int : int -> char
|
|
564
|
+
(** Return the character with the given ASCII code.
|
|
565
|
+
Raise [Invalid_argument "char_of_int"] if the argument is
|
|
566
|
+
outside the range 0--255. *)
|
|
567
|
+
|
|
568
|
+
|
|
569
|
+
(** {1 Unit operations} *)
|
|
570
|
+
|
|
571
|
+
external ignore : 'a -> unit = "%ignore"
|
|
572
|
+
(** Discard the value of its argument and return [()].
|
|
573
|
+
For instance, [ignore(f x)] discards the result of
|
|
574
|
+
the side-effecting function [f]. It is equivalent to
|
|
575
|
+
[f x; ()], except that the latter may generate a
|
|
576
|
+
compiler warning; writing [ignore(f x)] instead
|
|
577
|
+
avoids the warning. *)
|
|
578
|
+
|
|
579
|
+
|
|
580
|
+
(** {1 String conversion functions} *)
|
|
581
|
+
|
|
582
|
+
val string_of_bool : bool -> string
|
|
583
|
+
(** Return the string representation of a boolean. As the returned values
|
|
584
|
+
may be shared, the user should not modify them directly.
|
|
585
|
+
*)
|
|
586
|
+
|
|
587
|
+
val bool_of_string : string -> bool
|
|
588
|
+
(** Convert the given string to a boolean.
|
|
589
|
+
Raise [Invalid_argument "bool_of_string"] if the string is not
|
|
590
|
+
["true"] or ["false"]. *)
|
|
591
|
+
|
|
592
|
+
val bool_of_string_opt: string -> bool option
|
|
593
|
+
(** Convert the given string to a boolean.
|
|
594
|
+
Return [None] if the string is not
|
|
595
|
+
["true"] or ["false"].
|
|
596
|
+
@since 4.05
|
|
597
|
+
*)
|
|
598
|
+
|
|
599
|
+
|
|
600
|
+
external string_of_int : int -> string = "String" [@@bs.val]
|
|
601
|
+
(** Return the string representation of an integer, in decimal. *)
|
|
602
|
+
|
|
603
|
+
external int_of_string : string -> int = "?int_of_string"
|
|
604
|
+
(** Convert the given string to an integer.
|
|
605
|
+
The string is read in decimal (by default, or if the string
|
|
606
|
+
begins with [0u]), in hexadecimal (if it begins with [0x] or
|
|
607
|
+
[0X]), in octal (if it begins with [0o] or [0O]), or in binary
|
|
608
|
+
(if it begins with [0b] or [0B]).
|
|
609
|
+
|
|
610
|
+
The [0u] prefix reads the input as an unsigned integer in the range
|
|
611
|
+
[[0, 2*max_int+1]]. If the input exceeds {!max_int}
|
|
612
|
+
it is converted to the signed integer
|
|
613
|
+
[min_int + input - max_int - 1].
|
|
614
|
+
|
|
615
|
+
The [_] (underscore) character can appear anywhere in the string
|
|
616
|
+
and is ignored.
|
|
617
|
+
Raise [Failure "int_of_string"] if the given string is not
|
|
618
|
+
a valid representation of an integer, or if the integer represented
|
|
619
|
+
exceeds the range of integers representable in type [int]. *)
|
|
620
|
+
|
|
621
|
+
|
|
622
|
+
val int_of_string_opt: string -> int option
|
|
623
|
+
(** Same as [int_of_string], but returns [None] instead of raising.
|
|
624
|
+
@since 4.05
|
|
625
|
+
*)
|
|
626
|
+
|
|
627
|
+
val string_of_float : float -> string
|
|
628
|
+
[@@ocaml.deprecated "Please use Js.Float.toString instead, string_of_float generates unparseable floats"]
|
|
629
|
+
(** Return the string representation of a floating-point number. *)
|
|
630
|
+
|
|
631
|
+
external float_of_string : string -> float = "?float_of_string"
|
|
632
|
+
(** Convert the given string to a float. The string is read in decimal
|
|
633
|
+
(by default) or in hexadecimal (marked by [0x] or [0X]).
|
|
634
|
+
The format of decimal floating-point numbers is
|
|
635
|
+
[ [-] dd.ddd (e|E) [+|-] dd ], where [d] stands for a decimal digit.
|
|
636
|
+
The format of hexadecimal floating-point numbers is
|
|
637
|
+
[ [-] 0(x|X) hh.hhh (p|P) [+|-] dd ], where [h] stands for an
|
|
638
|
+
hexadecimal digit and [d] for a decimal digit.
|
|
639
|
+
In both cases, at least one of the integer and fractional parts must be
|
|
640
|
+
given; the exponent part is optional.
|
|
641
|
+
The [_] (underscore) character can appear anywhere in the string
|
|
642
|
+
and is ignored.
|
|
643
|
+
Depending on the execution platforms, other representations of
|
|
644
|
+
floating-point numbers can be accepted, but should not be relied upon.
|
|
645
|
+
Raise [Failure "float_of_string"] if the given string is not a valid
|
|
646
|
+
representation of a float. *)
|
|
647
|
+
|
|
648
|
+
val float_of_string_opt: string -> float option
|
|
649
|
+
(** Same as [float_of_string], but returns [None] instead of raising.
|
|
650
|
+
@since 4.05
|
|
651
|
+
*)
|
|
652
|
+
|
|
653
|
+
(** {1 Pair operations} *)
|
|
654
|
+
|
|
655
|
+
external fst : 'a * 'b -> 'a = "%field0"
|
|
656
|
+
(** Return the first component of a pair. *)
|
|
657
|
+
|
|
658
|
+
external snd : 'a * 'b -> 'b = "%field1"
|
|
659
|
+
(** Return the second component of a pair. *)
|
|
660
|
+
|
|
661
|
+
|
|
662
|
+
(** {1 List operations}
|
|
663
|
+
|
|
664
|
+
More list operations are provided in module {!List}.
|
|
665
|
+
*)
|
|
666
|
+
|
|
667
|
+
val ( @ ) : 'a list -> 'a list -> 'a list
|
|
668
|
+
[@@ocaml.deprecated "Use Belt.List.concat instead"]
|
|
669
|
+
(** List concatenation. Tail-recursive (length of the first argument).
|
|
670
|
+
Right-associative operator at precedence level 5/11. *)
|
|
671
|
+
|
|
672
|
+
|
|
673
|
+
type int32 = int
|
|
674
|
+
|
|
675
|
+
|
|
676
|
+
|
|
677
|
+
|
|
678
|
+
|
|
679
|
+
val print_string : string -> unit
|
|
680
|
+
(** Print a string on standard output. *)
|
|
681
|
+
|
|
682
|
+
|
|
683
|
+
val print_int : int -> unit
|
|
684
|
+
(** Print an integer, in decimal, on standard output. *)
|
|
685
|
+
|
|
686
|
+
val print_float : float -> unit
|
|
687
|
+
(** Print a floating-point number, in decimal, on standard output. *)
|
|
688
|
+
external print_endline : string -> unit = "log"
|
|
689
|
+
[@@bs.val] [@@bs.scope "console"]
|
|
690
|
+
(** Print a string, followed by a newline character, on
|
|
691
|
+
standard output and flush standard output. *)
|
|
692
|
+
|
|
693
|
+
val print_newline : unit -> unit
|
|
694
|
+
(** Print a newline character on standard output, and flush
|
|
695
|
+
standard output. This can be used to simulate line
|
|
696
|
+
buffering of standard output. *)
|
|
697
|
+
|
|
698
|
+
|
|
699
|
+
external prerr_endline : string -> unit = "error"
|
|
700
|
+
[@@bs.val] [@@bs.scope "console"]
|
|
701
|
+
(** Print a string, followed by a newline character on standard
|
|
702
|
+
error and flush standard error. *)
|
|
703
|
+
|
|
704
|
+
val prerr_newline : unit -> unit
|
|
705
|
+
(** Print a newline character on standard error, and flush
|
|
706
|
+
standard error. *)
|
|
707
|
+
|
|
708
|
+
|
|
709
|
+
|
|
710
|
+
|
|
711
|
+
|
|
712
|
+
(** {1 References} *)
|
|
713
|
+
|
|
714
|
+
type 'a ref = { mutable contents : 'a }
|
|
715
|
+
(** The type of references (mutable indirection cells) containing
|
|
716
|
+
a value of type ['a]. *)
|
|
717
|
+
|
|
718
|
+
external ref : 'a -> 'a ref = "%makemutable"
|
|
719
|
+
(** Return a fresh reference containing the given value. *)
|
|
720
|
+
|
|
721
|
+
external ( ! ) : 'a ref -> 'a = "%bs_ref_field0"
|
|
722
|
+
(** [!r] returns the current contents of reference [r].
|
|
723
|
+
Equivalent to [fun r -> r.contents].
|
|
724
|
+
Unary operator at precedence level 11/11.*)
|
|
725
|
+
|
|
726
|
+
external ( := ) : 'a ref -> 'a -> unit = "%bs_ref_setfield0"
|
|
727
|
+
(** [r := a] stores the value of [a] in reference [r].
|
|
728
|
+
Equivalent to [fun r v -> r.contents <- v].
|
|
729
|
+
Right-associative operator at precedence level 1/11. *)
|
|
730
|
+
|
|
731
|
+
external incr : int ref -> unit = "%incr"
|
|
732
|
+
(** Increment the integer contained in the given reference.
|
|
733
|
+
Equivalent to [fun r -> r := succ !r]. *)
|
|
734
|
+
|
|
735
|
+
external decr : int ref -> unit = "%decr"
|
|
736
|
+
(** Decrement the integer contained in the given reference.
|
|
737
|
+
Equivalent to [fun r -> r := pred !r]. *)
|
|
738
|
+
|
|
739
|
+
(** {1 Result type} *)
|
|
740
|
+
|
|
741
|
+
(** @since 4.03.0 *)
|
|
742
|
+
type ('a, 'b) result = ('a, 'b) Belt.Result.t =
|
|
743
|
+
| Ok of 'a
|
|
744
|
+
| Error of 'b
|
|
745
|
+
|
|
746
|
+
|
|
747
|
+
(** {1 Program termination} *)
|
|
748
|
+
|
|
749
|
+
val exit : int -> 'a
|
|
750
|
+
(** Terminate the process, returning the given status code
|
|
751
|
+
to the operating system: usually 0 to indicate no errors,
|
|
752
|
+
and a small positive integer to indicate failure.
|
|
753
|
+
All open output channels are flushed with [flush_all].
|
|
754
|
+
An implicit [exit 0] is performed each time a program
|
|
755
|
+
terminates normally. An implicit [exit 2] is performed if the program
|
|
756
|
+
terminates early because of an uncaught exception. *)
|
|
757
|
+
|
|
758
|
+
val at_exit : (unit -> unit) -> unit
|
|
759
|
+
(** Register the given function to be called at program termination
|
|
760
|
+
time. The functions registered with [at_exit] will be called when
|
|
761
|
+
the program does any of the following:
|
|
762
|
+
- executes {!Pervasives.exit}
|
|
763
|
+
- terminates, either normally or because of an uncaught
|
|
764
|
+
exception
|
|
765
|
+
- executes the C function [caml_shutdown].
|
|
766
|
+
The functions are called in 'last in, first out' order: the
|
|
767
|
+
function most recently added with [at_exit] is called first. *)
|
|
768
|
+
|
|
769
|
+
(**/**)
|
|
770
|
+
|
|
771
|
+
val valid_float_lexem : string -> string
|