@tellahq/rescript 10.1.4-republish-1 → 10.1.4-republish-2
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/darwinarm64/ninja.exe +0 -0
- package/package.json +1 -1
- 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 +0 -359
- package/lib/ocaml/arg.mli +0 -185
- 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 +0 -307
- package/lib/ocaml/array.mli +0 -275
- 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 +0 -307
- package/lib/ocaml/arrayLabels.mli +0 -276
- package/lib/ocaml/belt.cmi +0 -0
- package/lib/ocaml/belt.cmt +0 -0
- package/lib/ocaml/belt.ml +0 -352
- 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 +0 -525
- package/lib/ocaml/belt_Array.mli +0 -707
- 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 +0 -50
- package/lib/ocaml/belt_Float.mli +0 -106
- 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 +0 -226
- package/lib/ocaml/belt_HashMap.mli +0 -436
- 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 +0 -206
- package/lib/ocaml/belt_HashMapInt.mli +0 -50
- 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 +0 -206
- package/lib/ocaml/belt_HashMapString.mli +0 -50
- 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 +0 -196
- package/lib/ocaml/belt_HashSet.mli +0 -125
- 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 +0 -155
- package/lib/ocaml/belt_HashSetInt.mli +0 -74
- 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 +0 -156
- package/lib/ocaml/belt_HashSetString.mli +0 -74
- 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 +0 -133
- package/lib/ocaml/belt_Id.mli +0 -171
- 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 +0 -50
- package/lib/ocaml/belt_Int.mli +0 -103
- 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 +0 -803
- package/lib/ocaml/belt_List.mli +0 -844
- 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 +0 -170
- package/lib/ocaml/belt_Map.mli +0 -496
- 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 +0 -278
- package/lib/ocaml/belt_MapDict.mli +0 -268
- 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 +0 -169
- package/lib/ocaml/belt_MapInt.mli +0 -187
- 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 +0 -169
- package/lib/ocaml/belt_MapString.mli +0 -187
- 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 +0 -241
- package/lib/ocaml/belt_MutableMap.mli +0 -145
- 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 +0 -172
- package/lib/ocaml/belt_MutableMapInt.mli +0 -135
- 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 +0 -172
- package/lib/ocaml/belt_MutableMapString.mli +0 -135
- 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 +0 -222
- package/lib/ocaml/belt_MutableQueue.mli +0 -116
- 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 +0 -371
- package/lib/ocaml/belt_MutableSet.mli +0 -617
- 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 +0 -342
- package/lib/ocaml/belt_MutableSetInt.mli +0 -124
- 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 +0 -342
- package/lib/ocaml/belt_MutableSetString.mli +0 -124
- 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 +0 -106
- package/lib/ocaml/belt_MutableStack.mli +0 -63
- 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 +0 -93
- package/lib/ocaml/belt_Option.mli +0 -270
- 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 +0 -76
- package/lib/ocaml/belt_Range.mli +0 -114
- 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 +0 -75
- package/lib/ocaml/belt_Result.mli +0 -205
- 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 +0 -205
- package/lib/ocaml/belt_Set.cppo.mli +0 -153
- package/lib/ocaml/belt_Set.ml +0 -164
- package/lib/ocaml/belt_Set.mli +0 -523
- 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 +0 -237
- package/lib/ocaml/belt_SetDict.mli +0 -567
- 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 +0 -201
- package/lib/ocaml/belt_SetInt.mli +0 -151
- 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 +0 -201
- package/lib/ocaml/belt_SetString.mli +0 -151
- 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 +0 -322
- package/lib/ocaml/belt_SortArray.mli +0 -146
- 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 +0 -263
- package/lib/ocaml/belt_SortArrayInt.mli +0 -93
- 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 +0 -263
- package/lib/ocaml/belt_SortArrayString.mli +0 -93
- package/lib/ocaml/belt_internalAVLset.cmt +0 -0
- package/lib/ocaml/belt_internalAVLset.cmti +0 -0
- package/lib/ocaml/belt_internalAVLset.ml +0 -665
- package/lib/ocaml/belt_internalAVLset.mli +0 -124
- package/lib/ocaml/belt_internalAVLtree.cmt +0 -0
- package/lib/ocaml/belt_internalAVLtree.cmti +0 -0
- package/lib/ocaml/belt_internalAVLtree.ml +0 -762
- package/lib/ocaml/belt_internalAVLtree.mli +0 -215
- package/lib/ocaml/belt_internalBuckets.cmt +0 -0
- package/lib/ocaml/belt_internalBuckets.cmti +0 -0
- package/lib/ocaml/belt_internalBuckets.ml +0 -218
- package/lib/ocaml/belt_internalBuckets.mli +0 -57
- package/lib/ocaml/belt_internalBucketsType.cmt +0 -0
- package/lib/ocaml/belt_internalBucketsType.cmti +0 -0
- package/lib/ocaml/belt_internalBucketsType.ml +0 -59
- package/lib/ocaml/belt_internalBucketsType.mli +0 -46
- package/lib/ocaml/belt_internalMapInt.cmt +0 -0
- package/lib/ocaml/belt_internalMapInt.ml +0 -227
- package/lib/ocaml/belt_internalMapString.cmt +0 -0
- package/lib/ocaml/belt_internalMapString.ml +0 -227
- package/lib/ocaml/belt_internalSetBuckets.cmt +0 -0
- package/lib/ocaml/belt_internalSetBuckets.cmti +0 -0
- package/lib/ocaml/belt_internalSetBuckets.ml +0 -157
- package/lib/ocaml/belt_internalSetBuckets.mli +0 -47
- package/lib/ocaml/belt_internalSetInt.cmt +0 -0
- package/lib/ocaml/belt_internalSetInt.ml +0 -129
- package/lib/ocaml/belt_internalSetString.cmt +0 -0
- package/lib/ocaml/belt_internalSetString.ml +0 -129
- package/lib/ocaml/belt_internals.cmti +0 -0
- package/lib/ocaml/belt_internals.mli +0 -79
- 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 +0 -250
- package/lib/ocaml/buffer.mli +0 -149
- 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 +0 -431
- package/lib/ocaml/bytes.mli +0 -430
- 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 +0 -428
- package/lib/ocaml/bytesLabels.mli +0 -276
- 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 +0 -20
- package/lib/ocaml/callback.mli +0 -34
- 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 +0 -89
- package/lib/ocaml/camlinternalLazy.mli +0 -27
- 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 +0 -21
- package/lib/ocaml/camlinternalMod.mli +0 -25
- 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 +0 -76
- package/lib/ocaml/char.mli +0 -72
- 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 +0 -87
- package/lib/ocaml/complex.mli +0 -86
- 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 +0 -66
- package/lib/ocaml/digest.mli +0 -68
- package/lib/ocaml/dom.cmi +0 -0
- package/lib/ocaml/dom.cmt +0 -0
- package/lib/ocaml/dom.ml +0 -296
- package/lib/ocaml/dom_storage.cmi +0 -0
- package/lib/ocaml/dom_storage.cmt +0 -0
- package/lib/ocaml/dom_storage.ml +0 -22
- package/lib/ocaml/dom_storage2.cmi +0 -0
- package/lib/ocaml/dom_storage2.cmt +0 -0
- package/lib/ocaml/dom_storage2.ml +0 -11
- 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 +0 -233
- package/lib/ocaml/filename.mli +0 -134
- 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 +0 -201
- package/lib/ocaml/genlex.mli +0 -73
- package/lib/ocaml/hashmap.cppo.ml +0 -214
- package/lib/ocaml/hashmap.cppo.mli +0 -54
- package/lib/ocaml/hashset.cppo.ml +0 -165
- package/lib/ocaml/hashset.cppo.mli +0 -77
- 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 +0 -541
- package/lib/ocaml/hashtbl.mli +0 -411
- package/lib/ocaml/hashtblLabels.cmi +0 -0
- package/lib/ocaml/hashtblLabels.cmt +0 -0
- package/lib/ocaml/hashtblLabels.ml +0 -130
- 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 +0 -64
- package/lib/ocaml/int32.mli +0 -186
- 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 +0 -72
- package/lib/ocaml/int64.mli +0 -197
- package/lib/ocaml/internal_map.cppo.ml +0 -230
- package/lib/ocaml/internal_set.cppo.ml +0 -134
- package/lib/ocaml/js.cmi +0 -0
- package/lib/ocaml/js.cmt +0 -0
- package/lib/ocaml/js.ml +0 -316
- package/lib/ocaml/js_OO.cmi +0 -0
- package/lib/ocaml/js_OO.cmt +0 -0
- package/lib/ocaml/js_OO.ml +0 -180
- package/lib/ocaml/js_array.cmi +0 -0
- package/lib/ocaml/js_array.cmt +0 -0
- package/lib/ocaml/js_array.ml +0 -970
- package/lib/ocaml/js_array2.cmi +0 -0
- package/lib/ocaml/js_array2.cmt +0 -0
- package/lib/ocaml/js_array2.ml +0 -1065
- package/lib/ocaml/js_bigint.cmi +0 -0
- package/lib/ocaml/js_bigint.cmt +0 -0
- package/lib/ocaml/js_bigint.ml +0 -3
- 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 +0 -29
- package/lib/ocaml/js_cast.mli +0 -45
- package/lib/ocaml/js_console.cmi +0 -0
- package/lib/ocaml/js_console.cmt +0 -0
- package/lib/ocaml/js_console.ml +0 -51
- package/lib/ocaml/js_date.cmi +0 -0
- package/lib/ocaml/js_date.cmt +0 -0
- package/lib/ocaml/js_date.ml +0 -1263
- 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 +0 -114
- package/lib/ocaml/js_dict.mli +0 -152
- 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 +0 -102
- package/lib/ocaml/js_exn.mli +0 -79
- package/lib/ocaml/js_float.cmi +0 -0
- package/lib/ocaml/js_float.cmt +0 -0
- package/lib/ocaml/js_float.ml +0 -294
- package/lib/ocaml/js_global.cmi +0 -0
- package/lib/ocaml/js_global.cmt +0 -0
- package/lib/ocaml/js_global.ml +0 -185
- package/lib/ocaml/js_int.cmi +0 -0
- package/lib/ocaml/js_int.cmt +0 -0
- package/lib/ocaml/js_int.ml +0 -158
- 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 +0 -195
- package/lib/ocaml/js_json.mli +0 -244
- 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 +0 -174
- package/lib/ocaml/js_list.mli +0 -72
- package/lib/ocaml/js_map.cmi +0 -0
- package/lib/ocaml/js_map.cmt +0 -0
- package/lib/ocaml/js_map.ml +0 -3
- 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 +0 -50
- package/lib/ocaml/js_mapperRt.mli +0 -44
- package/lib/ocaml/js_math.cmi +0 -0
- package/lib/ocaml/js_math.cmt +0 -0
- package/lib/ocaml/js_math.ml +0 -626
- 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 +0 -57
- package/lib/ocaml/js_null.mli +0 -87
- 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 +0 -50
- package/lib/ocaml/js_null_undefined.mli +0 -85
- package/lib/ocaml/js_obj.cmi +0 -0
- package/lib/ocaml/js_obj.cmt +0 -0
- package/lib/ocaml/js_obj.ml +0 -100
- 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 +0 -203
- package/lib/ocaml/js_option.mli +0 -52
- package/lib/ocaml/js_promise.cmi +0 -0
- package/lib/ocaml/js_promise.cmt +0 -0
- package/lib/ocaml/js_promise.ml +0 -100
- package/lib/ocaml/js_promise2.cmi +0 -0
- package/lib/ocaml/js_promise2.cmt +0 -0
- package/lib/ocaml/js_promise2.res +0 -58
- package/lib/ocaml/js_re.cmi +0 -0
- package/lib/ocaml/js_re.cmt +0 -0
- package/lib/ocaml/js_re.ml +0 -184
- 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 +0 -28
- package/lib/ocaml/js_result.mli +0 -28
- package/lib/ocaml/js_set.cmi +0 -0
- package/lib/ocaml/js_set.cmt +0 -0
- package/lib/ocaml/js_set.ml +0 -3
- package/lib/ocaml/js_string.cmi +0 -0
- package/lib/ocaml/js_string.cmt +0 -0
- package/lib/ocaml/js_string.ml +0 -914
- package/lib/ocaml/js_string2.cmi +0 -0
- package/lib/ocaml/js_string2.cmt +0 -0
- package/lib/ocaml/js_string2.ml +0 -912
- 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 +0 -429
- package/lib/ocaml/js_typed_array.ml +0 -1405
- 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 +0 -296
- package/lib/ocaml/js_typed_array2.ml +0 -1269
- 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 +0 -118
- package/lib/ocaml/js_types.mli +0 -78
- 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 +0 -59
- package/lib/ocaml/js_undefined.mli +0 -92
- 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 +0 -143
- package/lib/ocaml/js_vector.mli +0 -92
- package/lib/ocaml/js_weakmap.cmi +0 -0
- package/lib/ocaml/js_weakmap.cmt +0 -0
- package/lib/ocaml/js_weakmap.ml +0 -3
- package/lib/ocaml/js_weakset.cmi +0 -0
- package/lib/ocaml/js_weakset.cmt +0 -0
- package/lib/ocaml/js_weakset.ml +0 -3
- package/lib/ocaml/jsx.cmi +0 -0
- package/lib/ocaml/jsx.cmt +0 -0
- package/lib/ocaml/jsx.res +0 -40
- package/lib/ocaml/jsxDOM.cmi +0 -0
- package/lib/ocaml/jsxDOM.cmt +0 -0
- package/lib/ocaml/jsxDOM.res +0 -620
- package/lib/ocaml/jsxDOMStyle.cmi +0 -0
- package/lib/ocaml/jsxDOMStyle.cmt +0 -0
- package/lib/ocaml/jsxDOMStyle.ml +0 -781
- package/lib/ocaml/jsxEvent.cmi +0 -0
- package/lib/ocaml/jsxEvent.cmt +0 -0
- package/lib/ocaml/jsxEvent.ml +0 -358
- package/lib/ocaml/jsxPPXReactSupport.cmi +0 -0
- package/lib/ocaml/jsxPPXReactSupport.cmt +0 -0
- package/lib/ocaml/jsxPPXReactSupport.res +0 -48
- 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 +0 -70
- package/lib/ocaml/lazy.mli +0 -95
- 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 +0 -230
- package/lib/ocaml/lexing.mli +0 -172
- 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 +0 -485
- package/lib/ocaml/list.mli +0 -347
- 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 +0 -485
- package/lib/ocaml/listLabels.mli +0 -353
- 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 +0 -174
- package/lib/ocaml/map.cppo.mli +0 -191
- package/lib/ocaml/map.ml +0 -480
- package/lib/ocaml/map.mli +0 -315
- package/lib/ocaml/mapLabels.cmi +0 -0
- package/lib/ocaml/mapLabels.cmt +0 -0
- package/lib/ocaml/mapLabels.ml +0 -480
- package/lib/ocaml/mapm.cppo.ml +0 -177
- package/lib/ocaml/mapm.cppo.mli +0 -138
- 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 +0 -22
- package/lib/ocaml/moreLabels.mli +0 -198
- package/lib/ocaml/node.cmi +0 -0
- package/lib/ocaml/node.cmt +0 -0
- package/lib/ocaml/node.ml +0 -84
- package/lib/ocaml/node_buffer.cmi +0 -0
- package/lib/ocaml/node_buffer.cmt +0 -0
- package/lib/ocaml/node_buffer.ml +0 -47
- 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 +0 -50
- package/lib/ocaml/node_fs.cmi +0 -0
- package/lib/ocaml/node_fs.cmt +0 -0
- package/lib/ocaml/node_fs.ml +0 -153
- package/lib/ocaml/node_module.cmi +0 -0
- package/lib/ocaml/node_module.cmt +0 -0
- package/lib/ocaml/node_module.ml +0 -29
- package/lib/ocaml/node_path.cmi +0 -0
- package/lib/ocaml/node_path.cmt +0 -0
- package/lib/ocaml/node_path.ml +0 -71
- 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 +0 -59
- package/lib/ocaml/node_process.mli +0 -48
- 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 +0 -29
- package/lib/ocaml/obj.mli +0 -62
- 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 +0 -212
- package/lib/ocaml/parsing.mli +0 -105
- 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 +0 -297
- package/lib/ocaml/pervasives.mli +0 -771
- 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 +0 -75
- package/lib/ocaml/printexc.mli +0 -57
- 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 +0 -132
- package/lib/ocaml/queue.mli +0 -82
- 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 +0 -273
- package/lib/ocaml/random.mli +0 -102
- 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 +0 -526
- package/lib/ocaml/set.mli +0 -266
- package/lib/ocaml/setLabels.cmi +0 -0
- package/lib/ocaml/setLabels.cmt +0 -0
- package/lib/ocaml/setLabels.ml +0 -526
- package/lib/ocaml/setm.cppo.ml +0 -346
- package/lib/ocaml/setm.cppo.mli +0 -126
- 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 +0 -267
- package/lib/ocaml/sort.cppo.mli +0 -96
- package/lib/ocaml/sort.ml +0 -99
- package/lib/ocaml/sort.mli +0 -44
- 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 +0 -44
- package/lib/ocaml/stack.mli +0 -63
- 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 +0 -24
- package/lib/ocaml/stdLabels.mli +0 -29
- 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 +0 -213
- package/lib/ocaml/stream.mli +0 -108
- 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 +0 -190
- package/lib/ocaml/string.mli +0 -286
- 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 +0 -190
- package/lib/ocaml/stringLabels.mli +0 -241
- 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 +0 -135
- package/lib/ocaml/sys.mli +0 -333
- 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 +0 -58
- package/lib/ocaml/uchar.mli +0 -98
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
(* Copyright (C) 2017 Authors of ReScript
|
|
2
|
-
*
|
|
3
|
-
* This program is free software: you can redistribute it and/or modify
|
|
4
|
-
* it under the terms of the GNU Lesser General Public License as published by
|
|
5
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
6
|
-
* (at your option) any later version.
|
|
7
|
-
*
|
|
8
|
-
* In addition to the permissions granted to you by the LGPL, you may combine
|
|
9
|
-
* or link a "work that uses the Library" with a publicly distributed version
|
|
10
|
-
* of this file to produce a combined library or application, then distribute
|
|
11
|
-
* that combined work under the terms of your choosing, with no requirement
|
|
12
|
-
* to comply with the obligations normally placed on you by section 4 of the
|
|
13
|
-
* LGPL version 3 (or the corresponding section of a later version of the LGPL
|
|
14
|
-
* should you choose to use a later version).
|
|
15
|
-
*
|
|
16
|
-
* This program is distributed in the hope that it will be useful,
|
|
17
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
18
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
19
|
-
* GNU Lesser General Public License for more details.
|
|
20
|
-
*
|
|
21
|
-
* You should have received a copy of the GNU Lesser General Public License
|
|
22
|
-
* along with this program; if not, write to the Free Software
|
|
23
|
-
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
|
|
24
|
-
|
|
25
|
-
(**
|
|
26
|
-
Result types are really useful to describe the result of a certain operation
|
|
27
|
-
without relying on exceptions or `option` types.
|
|
28
|
-
|
|
29
|
-
This module gives you useful utilities to create and combine `Result` data.
|
|
30
|
-
*)
|
|
31
|
-
|
|
32
|
-
type ('a,'b) t = Ok of 'a | Error of 'b
|
|
33
|
-
(**
|
|
34
|
-
The type `Result.t(result, err)` describes a variant of two states:
|
|
35
|
-
`Ok(someResult)` represents a successful operation, whereby
|
|
36
|
-
``Error(someError)` signals an erronous operation.
|
|
37
|
-
|
|
38
|
-
In this concrete example, we are defining our own `Result` type to reflect an HTTP like
|
|
39
|
-
query operation:
|
|
40
|
-
|
|
41
|
-
```res example
|
|
42
|
-
type responseError = NotAvailable | NotFound
|
|
43
|
-
type queryResult = t<string, responseError>
|
|
44
|
-
|
|
45
|
-
let failQueryUser = (username: string): queryResult => {
|
|
46
|
-
Error(NotAvailable)
|
|
47
|
-
}
|
|
48
|
-
```
|
|
49
|
-
*)
|
|
50
|
-
|
|
51
|
-
val getExn : ('a, 'b) t -> 'a
|
|
52
|
-
(**
|
|
53
|
-
`getExn(res)`: when `res` is `Ok(n)`, returns `n` when `res` is `Error(m)`, raise an exception
|
|
54
|
-
|
|
55
|
-
```res example
|
|
56
|
-
Belt.Result.getExn(Belt.Result.Ok(42)) == 42
|
|
57
|
-
|
|
58
|
-
Belt.Result.getExn(Belt.Result.Error("Invalid data")) /* raises exception */
|
|
59
|
-
```
|
|
60
|
-
*)
|
|
61
|
-
|
|
62
|
-
val mapWithDefaultU : ('a, 'c) t -> 'b -> ('a -> 'b [@bs]) -> 'b
|
|
63
|
-
val mapWithDefault : ('a, 'c) t -> 'b -> ('a -> 'b) -> 'b
|
|
64
|
-
(**
|
|
65
|
-
`mapWithDefault(res, default, f)`: When res is `Ok(n)`, returns `f(n)`,
|
|
66
|
-
otherwise `default`.
|
|
67
|
-
|
|
68
|
-
```res example
|
|
69
|
-
let ok = Belt.Result.Ok(42)
|
|
70
|
-
Belt.Result.mapWithDefault(ok, 0, (x) => x / 2) == 21
|
|
71
|
-
|
|
72
|
-
let error = Belt.Result.Error("Invalid data")
|
|
73
|
-
Belt.Result.mapWithDefault(error, 0, (x) => x / 2) == 0
|
|
74
|
-
```
|
|
75
|
-
*)
|
|
76
|
-
|
|
77
|
-
val mapU : ('a, 'c) t -> ('a -> 'b [@bs]) -> ('b, 'c) t
|
|
78
|
-
val map : ('a, 'c) t -> ('a -> 'b) -> ('b, 'c) t
|
|
79
|
-
(**
|
|
80
|
-
`map(res, f)`: When res is `Ok(n)`, returns `Ok(f(n))`. Otherwise returns res
|
|
81
|
-
unchanged. Function `f` takes a value of the same type as `n` and returns an
|
|
82
|
-
ordinary value.
|
|
83
|
-
|
|
84
|
-
```res example
|
|
85
|
-
let f = (x) => sqrt(Belt.Int.toFloat(x))
|
|
86
|
-
|
|
87
|
-
Belt.Result.map(Ok(64), f) == Ok(8.0)
|
|
88
|
-
|
|
89
|
-
Belt.Result.map(Error("Invalid data"), f) == Error("Invalid data")
|
|
90
|
-
```
|
|
91
|
-
*)
|
|
92
|
-
|
|
93
|
-
val flatMapU : ('a, 'c) t -> ('a -> ('b, 'c) t [@bs]) -> ('b, 'c) t
|
|
94
|
-
val flatMap : ('a, 'c) t -> ('a -> ('b, 'c) t) -> ('b, 'c) t
|
|
95
|
-
(**
|
|
96
|
-
`flatMap(res, f)`: When res is `Ok(n)`, returns `f(n)`. Otherwise, returns res
|
|
97
|
-
unchanged. Function `f` takes a value of the same type as `n` and returns a
|
|
98
|
-
`Belt.Result`.
|
|
99
|
-
|
|
100
|
-
```res example
|
|
101
|
-
let recip = (x) =>
|
|
102
|
-
if (x !== 0.0) {
|
|
103
|
-
Belt.Result.Ok(1.0 /. x)
|
|
104
|
-
} else {
|
|
105
|
-
Belt.Result.Error("Divide by zero")
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
Belt.Result.flatMap(Ok(2.0), recip) == Ok(0.5)
|
|
109
|
-
|
|
110
|
-
Belt.Result.flatMap(Ok(0.0), recip) == Error("Divide by zero")
|
|
111
|
-
|
|
112
|
-
Belt.Result.flatMap(Error("Already bad"), recip) == Error("Already bad")
|
|
113
|
-
```
|
|
114
|
-
*)
|
|
115
|
-
|
|
116
|
-
val getWithDefault : ('a, 'b) t -> 'a -> 'a
|
|
117
|
-
(**
|
|
118
|
-
`getWithDefault(res, defaultValue)`: If `res` is `Ok(n)`, returns `n`,
|
|
119
|
-
otherwise `default`
|
|
120
|
-
|
|
121
|
-
```res example
|
|
122
|
-
Belt.Result.getWithDefault(Ok(42), 0) == 42
|
|
123
|
-
|
|
124
|
-
Belt.Result.getWithDefault(Error("Invalid Data"), 0) == 0
|
|
125
|
-
```
|
|
126
|
-
*)
|
|
127
|
-
|
|
128
|
-
val isOk : ('a, 'b) t -> bool
|
|
129
|
-
(**
|
|
130
|
-
`isOk(res)`: Returns `true` if `res` is of the form `Ok(n)`, `false` if it is
|
|
131
|
-
the `Error(e)` variant.
|
|
132
|
-
*)
|
|
133
|
-
|
|
134
|
-
val isError : ('a, 'b) t -> bool
|
|
135
|
-
(**
|
|
136
|
-
`isError(res)`: Returns `true` if `res` is of the form `Error(e)`, `false` if
|
|
137
|
-
it is the `Ok(n)` variant.
|
|
138
|
-
*)
|
|
139
|
-
|
|
140
|
-
val eqU : ('a, 'c) t -> ('b, 'd) t -> ('a -> 'b -> bool [@bs]) -> bool
|
|
141
|
-
val eq : ('a, 'c) t -> ('b, 'd) t -> ('a -> 'b -> bool) -> bool
|
|
142
|
-
(**
|
|
143
|
-
`eq(res1, res2, f)`: Determine if two `Belt.Result` variables are equal with
|
|
144
|
-
respect to an equality function. If `res1` and `res2` are of the form `Ok(n)`
|
|
145
|
-
and `Ok(m)`, return the result of `f(n, m)`. If one of `res1` and `res2` are of
|
|
146
|
-
the form `Error(e)`, return false If both `res1` and `res2` are of the form
|
|
147
|
-
`Error(e)`, return true
|
|
148
|
-
|
|
149
|
-
```res example
|
|
150
|
-
let good1 = Belt.Result.Ok(42)
|
|
151
|
-
|
|
152
|
-
let good2 = Belt.Result.Ok(32)
|
|
153
|
-
|
|
154
|
-
let bad1 = Belt.Result.Error("invalid")
|
|
155
|
-
|
|
156
|
-
let bad2 = Belt.Result.Error("really invalid")
|
|
157
|
-
|
|
158
|
-
let mod10equal = (a, b) => mod(a, 10) === mod(b, 10)
|
|
159
|
-
|
|
160
|
-
Belt.Result.eq(good1, good2, mod10equal) == true
|
|
161
|
-
|
|
162
|
-
Belt.Result.eq(good1, bad1, mod10equal) == false
|
|
163
|
-
|
|
164
|
-
Belt.Result.eq(bad2, good2, mod10equal) == false
|
|
165
|
-
|
|
166
|
-
Belt.Result.eq(bad1, bad2, mod10equal) == true
|
|
167
|
-
```
|
|
168
|
-
*)
|
|
169
|
-
|
|
170
|
-
val cmpU : ('a, 'c) t -> ('b, 'd) t -> ('a -> 'b -> int [@bs]) -> int
|
|
171
|
-
val cmp : ('a, 'c) t -> ('b, 'd) t -> ('a -> 'b -> int) -> int
|
|
172
|
-
(**
|
|
173
|
-
`cmp(res1, res2, f)`: Compare two `Belt.Result` variables with respect to a
|
|
174
|
-
comparison function. The comparison function returns -1 if the first variable
|
|
175
|
-
is "less than" the second, 0 if the two variables are equal, and 1 if the first
|
|
176
|
-
is "greater than" the second.
|
|
177
|
-
|
|
178
|
-
If `res1` and `res2` are of the form `Ok(n)` and `Ok(m)`, return the result of
|
|
179
|
-
`f(n, m)`. If `res1` is of the form `Error(e)` and `res2` of the form `Ok(n)`,
|
|
180
|
-
return -1 (nothing is less than something) If `res1` is of the form `Ok(n)` and
|
|
181
|
-
`res2` of the form `Error(e)`, return 1 (something is greater than nothing) If
|
|
182
|
-
both `res1` and `res2` are of the form `Error(e)`, return 0 (equal)
|
|
183
|
-
|
|
184
|
-
```res example
|
|
185
|
-
let good1 = Belt.Result.Ok(59)
|
|
186
|
-
|
|
187
|
-
let good2 = Belt.Result.Ok(37)
|
|
188
|
-
|
|
189
|
-
let bad1 = Belt.Result.Error("invalid")
|
|
190
|
-
|
|
191
|
-
let bad2 = Belt.Result.Error("really invalid")
|
|
192
|
-
|
|
193
|
-
let mod10cmp = (a, b) => Pervasives.compare(mod(a, 10), mod(b, 10))
|
|
194
|
-
|
|
195
|
-
Belt.Result.cmp(Ok(39), Ok(57), mod10cmp) == 1
|
|
196
|
-
|
|
197
|
-
Belt.Result.cmp(Ok(57), Ok(39), mod10cmp) == (-1)
|
|
198
|
-
|
|
199
|
-
Belt.Result.cmp(Ok(39), Error("y"), mod10cmp) == 1
|
|
200
|
-
|
|
201
|
-
Belt.Result.cmp(Error("x"), Ok(57), mod10cmp) == (-1)
|
|
202
|
-
|
|
203
|
-
Belt.Result.cmp(Error("x"), Error("y"), mod10cmp) == 0
|
|
204
|
-
```
|
|
205
|
-
*)
|
package/lib/ocaml/belt_Set.cmi
DELETED
|
Binary file
|
package/lib/ocaml/belt_Set.cmt
DELETED
|
Binary file
|
package/lib/ocaml/belt_Set.cmti
DELETED
|
Binary file
|
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
#ifdef TYPE_INT
|
|
2
|
-
module I = Belt_internalSetInt
|
|
3
|
-
#elif defined TYPE_STRING
|
|
4
|
-
module I = Belt_internalSetString
|
|
5
|
-
#else
|
|
6
|
-
[%error "unknown type"]
|
|
7
|
-
#endif
|
|
8
|
-
module N = Belt_internalAVLset
|
|
9
|
-
module A = Belt_Array
|
|
10
|
-
|
|
11
|
-
type value = I.value
|
|
12
|
-
type t = I.t
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
let empty = None
|
|
16
|
-
let isEmpty = N.isEmpty
|
|
17
|
-
let minimum = N.minimum
|
|
18
|
-
let minUndefined = N.minUndefined
|
|
19
|
-
let maximum = N.maximum
|
|
20
|
-
let maxUndefined = N.maxUndefined
|
|
21
|
-
|
|
22
|
-
let forEach = N.forEach
|
|
23
|
-
let forEachU = N.forEachU
|
|
24
|
-
let reduce = N.reduce
|
|
25
|
-
let reduceU = N.reduceU
|
|
26
|
-
let every = N.every
|
|
27
|
-
let everyU = N.everyU
|
|
28
|
-
let some = N.some
|
|
29
|
-
let someU = N.someU
|
|
30
|
-
let keep = N.keepShared
|
|
31
|
-
let keepU = N.keepSharedU
|
|
32
|
-
let partition = N.partitionShared
|
|
33
|
-
let partitionU = N.partitionSharedU
|
|
34
|
-
|
|
35
|
-
let size = N.size
|
|
36
|
-
let toList = N.toList
|
|
37
|
-
let toArray = N.toArray
|
|
38
|
-
let fromSortedArrayUnsafe = N.fromSortedArrayUnsafe
|
|
39
|
-
let checkInvariantInternal = N.checkInvariantInternal
|
|
40
|
-
|
|
41
|
-
let rec add (t : t) (x : value) : t =
|
|
42
|
-
match t with
|
|
43
|
-
None -> N.singleton x
|
|
44
|
-
| Some nt ->
|
|
45
|
-
let v = nt.value in
|
|
46
|
-
if x = v then t else
|
|
47
|
-
let {N.left = l; right = r} = nt in
|
|
48
|
-
if x < v then
|
|
49
|
-
let ll = add l x in
|
|
50
|
-
if ll == l then t
|
|
51
|
-
else N.bal ll v r
|
|
52
|
-
else
|
|
53
|
-
let rr = add r x in
|
|
54
|
-
if rr == r then t
|
|
55
|
-
else N.bal l v rr
|
|
56
|
-
|
|
57
|
-
let mergeMany h arr =
|
|
58
|
-
let len = A.length arr in
|
|
59
|
-
let v = ref h in
|
|
60
|
-
for i = 0 to len - 1 do
|
|
61
|
-
let key = A.getUnsafe arr i in
|
|
62
|
-
v .contents<- add v.contents key
|
|
63
|
-
done ;
|
|
64
|
-
v.contents
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
let rec remove (t : t) (x : value) : t =
|
|
68
|
-
match t with
|
|
69
|
-
| None -> t
|
|
70
|
-
| Some n ->
|
|
71
|
-
let {N.left = l; value = v; right = r} = n in
|
|
72
|
-
if x = v then
|
|
73
|
-
match l, r with
|
|
74
|
-
| None, _ -> r
|
|
75
|
-
| _, None -> l
|
|
76
|
-
| _, Some rn ->
|
|
77
|
-
let v = ref rn.value in
|
|
78
|
-
let r = N.removeMinAuxWithRef rn v in
|
|
79
|
-
N.bal l v.contents r
|
|
80
|
-
else
|
|
81
|
-
if x < v then
|
|
82
|
-
let ll = remove l x in
|
|
83
|
-
if ll == l then t
|
|
84
|
-
else N.bal ll v r
|
|
85
|
-
else
|
|
86
|
-
let rr = remove r x in
|
|
87
|
-
if rr == r then t
|
|
88
|
-
else N.bal l v rr
|
|
89
|
-
|
|
90
|
-
let removeMany h arr =
|
|
91
|
-
let len = A.length arr in
|
|
92
|
-
let v = ref h in
|
|
93
|
-
for i = 0 to len - 1 do
|
|
94
|
-
let key = A.getUnsafe arr i in
|
|
95
|
-
v .contents<- remove v.contents key
|
|
96
|
-
done ;
|
|
97
|
-
v.contents
|
|
98
|
-
|
|
99
|
-
let fromArray = I.fromArray
|
|
100
|
-
let cmp = I.cmp
|
|
101
|
-
let eq = I.eq
|
|
102
|
-
let get = I.get
|
|
103
|
-
let getUndefined = I.getUndefined
|
|
104
|
-
let getExn = I.getExn
|
|
105
|
-
let subset = I.subset
|
|
106
|
-
let has = I.has
|
|
107
|
-
|
|
108
|
-
let rec splitAuxNoPivot (n : _ N.node) (x : value) : t * t =
|
|
109
|
-
let {N.left = l; value = v; right = r} = n in
|
|
110
|
-
if x = v then l, r
|
|
111
|
-
else if x < v then
|
|
112
|
-
match l with
|
|
113
|
-
| None ->
|
|
114
|
-
None , Some n
|
|
115
|
-
| Some l ->
|
|
116
|
-
let ll, rl = splitAuxNoPivot l x in
|
|
117
|
-
ll, N.joinShared rl v r
|
|
118
|
-
else
|
|
119
|
-
match r with
|
|
120
|
-
| None ->
|
|
121
|
-
Some n, None
|
|
122
|
-
| Some r ->
|
|
123
|
-
let lr, rr = splitAuxNoPivot r x in
|
|
124
|
-
N.joinShared l v lr, rr
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
let rec splitAuxPivot (n : _ N.node) (x : value) pres : t * t =
|
|
128
|
-
let {N.left = l; value = v; right = r} = n in
|
|
129
|
-
if x = v then begin
|
|
130
|
-
pres .contents<- true;
|
|
131
|
-
(l, r)
|
|
132
|
-
end
|
|
133
|
-
else if x < v then
|
|
134
|
-
match l with
|
|
135
|
-
| None ->
|
|
136
|
-
None, Some n
|
|
137
|
-
| Some l ->
|
|
138
|
-
let ll, rl = splitAuxPivot l x pres in
|
|
139
|
-
ll, N.joinShared rl v r
|
|
140
|
-
else
|
|
141
|
-
match r with
|
|
142
|
-
| None ->
|
|
143
|
-
Some n, None
|
|
144
|
-
| Some r ->
|
|
145
|
-
let lr, rr = splitAuxPivot r x pres in
|
|
146
|
-
N.joinShared l v lr, rr
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
let split (t : t) (x : value) =
|
|
150
|
-
match t with
|
|
151
|
-
None ->
|
|
152
|
-
(None, None), false
|
|
153
|
-
| Some n ->
|
|
154
|
-
let pres = ref false in
|
|
155
|
-
let v = splitAuxPivot n x pres in
|
|
156
|
-
v, pres.contents
|
|
157
|
-
|
|
158
|
-
let rec union (s1 : t) (s2 : t) =
|
|
159
|
-
match s1, s2 with
|
|
160
|
-
(None, _) -> s2
|
|
161
|
-
| (_, None) -> s1
|
|
162
|
-
| Some n1, Some n2 (* (Node(l1, v1, r1, h1), Node(l2, v2, r2, h2)) *) ->
|
|
163
|
-
let h1, h2 = n1.height, n2.height in
|
|
164
|
-
if h1 >= h2 then
|
|
165
|
-
if h2 = 1 then add s1 n2.value else begin
|
|
166
|
-
let {N.left = l1; value = v1; right = r1} = n1 in
|
|
167
|
-
let (l2, r2) = splitAuxNoPivot n2 v1 in
|
|
168
|
-
N.joinShared (union l1 l2) v1 (union r1 r2)
|
|
169
|
-
end
|
|
170
|
-
else
|
|
171
|
-
if h1 = 1 then add s2 n1.value else begin
|
|
172
|
-
let {N.left = l2; value = v2; right = r2} = n2 in
|
|
173
|
-
let (l1, r1) = splitAuxNoPivot n1 v2 in
|
|
174
|
-
N.joinShared (union l1 l2) v2 (union r1 r2)
|
|
175
|
-
end
|
|
176
|
-
|
|
177
|
-
let rec intersect (s1 : t) (s2 : t) =
|
|
178
|
-
match s1, s2 with
|
|
179
|
-
(None, _)
|
|
180
|
-
| (_, None) -> None
|
|
181
|
-
| Some n1, Some n2 (* (Node(l1, v1, r1, _), t2) *) ->
|
|
182
|
-
let {N.left = l1; value = v1; right = r1} = n1 in
|
|
183
|
-
let pres = ref false in
|
|
184
|
-
let l2,r2 = splitAuxPivot n2 v1 pres in
|
|
185
|
-
let ll = intersect l1 l2 in
|
|
186
|
-
let rr = intersect r1 r2 in
|
|
187
|
-
if pres.contents then N.joinShared ll v1 rr
|
|
188
|
-
else N.concatShared ll rr
|
|
189
|
-
|
|
190
|
-
let rec diff (s1 : t) (s2 : t) =
|
|
191
|
-
match s1, s2 with
|
|
192
|
-
| (None, _)
|
|
193
|
-
| (_, None) -> s1
|
|
194
|
-
| Some n1, Some n2 (* (Node(l1, v1, r1, _), t2) *) ->
|
|
195
|
-
let {N.left = l1; value = v1; right = r1} = n1 in
|
|
196
|
-
let pres = ref false in
|
|
197
|
-
let l2, r2 = splitAuxPivot n2 v1 pres in
|
|
198
|
-
let ll = diff l1 l2 in
|
|
199
|
-
let rr = diff r1 r2 in
|
|
200
|
-
if pres.contents then N.concatShared ll rr
|
|
201
|
-
else N.joinShared ll v1 rr
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
(* Copyright (C) 2017 Authors of ReScript
|
|
2
|
-
*
|
|
3
|
-
* This program is free software: you can redistribute it and/or modify
|
|
4
|
-
* it under the terms of the GNU Lesser General Public License as published by
|
|
5
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
6
|
-
* (at your option) any later version.
|
|
7
|
-
*
|
|
8
|
-
* In addition to the permissions granted to you by the LGPL, you may combine
|
|
9
|
-
* or link a "work that uses the Library" with a publicly distributed version
|
|
10
|
-
* of this file to produce a combined library or application, then distribute
|
|
11
|
-
* that combined work under the terms of your choosing, with no requirement
|
|
12
|
-
* to comply with the obligations normally placed on you by section 4 of the
|
|
13
|
-
* LGPL version 3 (or the corresponding section of a later version of the LGPL
|
|
14
|
-
* should you choose to use a later version).
|
|
15
|
-
*
|
|
16
|
-
* This program is distributed in the hope that it will be useful,
|
|
17
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
18
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
19
|
-
* GNU Lesser General Public License for more details.
|
|
20
|
-
*
|
|
21
|
-
* You should have received a copy of the GNU Lesser General Public License
|
|
22
|
-
* along with this program; if not, write to the Free Software
|
|
23
|
-
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
|
|
24
|
-
|
|
25
|
-
(**
|
|
26
|
-
This module is [`Belt.Set`]() specialized with value type to be a primitive type.
|
|
27
|
-
It is more efficient in general, the API is the same with [`Belt_Set`]() except its value type is fixed,
|
|
28
|
-
and identity is not needed(using the built-in one)
|
|
29
|
-
|
|
30
|
-
**See** [`Belt.Set`]()
|
|
31
|
-
*)
|
|
32
|
-
|
|
33
|
-
#ifdef TYPE_STRING
|
|
34
|
-
type value = string
|
|
35
|
-
#elif defined TYPE_INT
|
|
36
|
-
type value = int
|
|
37
|
-
#else
|
|
38
|
-
[%error "unknown type"]
|
|
39
|
-
#endif
|
|
40
|
-
(** The type of the set elements. *)
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
type t
|
|
44
|
-
(** The type of sets. *)
|
|
45
|
-
|
|
46
|
-
val empty: t
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
val fromArray: value array -> t
|
|
50
|
-
|
|
51
|
-
val fromSortedArrayUnsafe: value array -> t
|
|
52
|
-
|
|
53
|
-
val isEmpty: t -> bool
|
|
54
|
-
|
|
55
|
-
val has: t -> value -> bool
|
|
56
|
-
|
|
57
|
-
val add: t -> value -> t
|
|
58
|
-
(** `add s x` If `x` was already in `s`, `s` is returned unchanged. *)
|
|
59
|
-
|
|
60
|
-
val mergeMany: t -> value array -> t
|
|
61
|
-
|
|
62
|
-
val remove: t -> value -> t
|
|
63
|
-
(** `remove m x` If `x` was not in `m`, `m` is returned reference unchanged. *)
|
|
64
|
-
|
|
65
|
-
val removeMany: t -> value array -> t
|
|
66
|
-
|
|
67
|
-
val union: t -> t -> t
|
|
68
|
-
|
|
69
|
-
val intersect: t -> t -> t
|
|
70
|
-
|
|
71
|
-
val diff: t -> t -> t
|
|
72
|
-
|
|
73
|
-
val subset: t -> t -> bool
|
|
74
|
-
(** `subset s1 s2` tests whether the set `s1` is a subset of
|
|
75
|
-
the set `s2`. *)
|
|
76
|
-
|
|
77
|
-
val cmp: t -> t -> int
|
|
78
|
-
(** Total ordering between sets. Can be used as the ordering function
|
|
79
|
-
for doing sets of sets. *)
|
|
80
|
-
|
|
81
|
-
val eq: t -> t -> bool
|
|
82
|
-
(** `eq s1 s2` tests whether the sets `s1` and `s2` are
|
|
83
|
-
equal, that is, contain equal elements. *)
|
|
84
|
-
|
|
85
|
-
val forEachU: t -> (value -> unit [@bs]) -> unit
|
|
86
|
-
val forEach: t -> (value -> unit) -> unit
|
|
87
|
-
(** `forEach s f` applies `f` in turn to all elements of `s`.
|
|
88
|
-
In increasing order *)
|
|
89
|
-
|
|
90
|
-
val reduceU: t -> 'a -> ('a -> value -> 'a [@bs]) -> 'a
|
|
91
|
-
val reduce: t -> 'a -> ('a -> value -> 'a) -> 'a
|
|
92
|
-
(** Iterate in increasing order. *)
|
|
93
|
-
|
|
94
|
-
val everyU: t -> (value -> bool [@bs]) -> bool
|
|
95
|
-
val every: t -> (value -> bool) -> bool
|
|
96
|
-
(** `every p s` checks if all elements of the set
|
|
97
|
-
satisfy the predicate `p`. Order unspecified. *)
|
|
98
|
-
|
|
99
|
-
val someU: t -> (value -> bool [@bs]) -> bool
|
|
100
|
-
val some: t -> (value -> bool) -> bool
|
|
101
|
-
(** `some p s` checks if at least one element of
|
|
102
|
-
the set satisfies the predicate `p`. Oder unspecified. *)
|
|
103
|
-
|
|
104
|
-
val keepU: t -> (value -> bool [@bs]) -> t
|
|
105
|
-
val keep: t -> (value -> bool) -> t
|
|
106
|
-
(** `keep p s` returns the set of all elements in `s`
|
|
107
|
-
that satisfy predicate `p`. *)
|
|
108
|
-
|
|
109
|
-
val partitionU: t -> (value -> bool [@bs]) -> t * t
|
|
110
|
-
val partition: t -> (value -> bool) -> t * t
|
|
111
|
-
(**
|
|
112
|
-
`partition p s` returns a pair of sets `(s1, s2)`, where
|
|
113
|
-
`s1` is the set of all the elements of `s` that satisfy the
|
|
114
|
-
predicate `p`, and `s2` is the set of all the elements of
|
|
115
|
-
`s` that do not satisfy `p`.
|
|
116
|
-
*)
|
|
117
|
-
|
|
118
|
-
val size: t -> int
|
|
119
|
-
|
|
120
|
-
val toList: t -> value list
|
|
121
|
-
(** In increasing order *)
|
|
122
|
-
|
|
123
|
-
val toArray: t -> value array
|
|
124
|
-
|
|
125
|
-
val minimum: t -> value option
|
|
126
|
-
|
|
127
|
-
val minUndefined: t -> value Js.undefined
|
|
128
|
-
|
|
129
|
-
val maximum: t -> value option
|
|
130
|
-
|
|
131
|
-
val maxUndefined: t -> value Js.undefined
|
|
132
|
-
|
|
133
|
-
val get: t -> value -> value option
|
|
134
|
-
|
|
135
|
-
val getUndefined: t -> value -> value Js.undefined
|
|
136
|
-
|
|
137
|
-
val getExn: t -> value -> value
|
|
138
|
-
|
|
139
|
-
val split: t -> value -> (t * t) * bool
|
|
140
|
-
(**
|
|
141
|
-
`split x s` returns a triple `(l, present, r)`, where
|
|
142
|
-
`l` is the set of elements of `s` that are
|
|
143
|
-
strictly less than `x`;
|
|
144
|
-
`r` is the set of elements of `s` that are
|
|
145
|
-
strictly greater than `x`;
|
|
146
|
-
`present` is `false` if `s` contains no element equal to `x`,
|
|
147
|
-
or `true` if `s` contains an element equal to `x`.
|
|
148
|
-
*)
|
|
149
|
-
|
|
150
|
-
val checkInvariantInternal: t -> unit
|
|
151
|
-
(**
|
|
152
|
-
**raise** when invariant is not held
|
|
153
|
-
*)
|