package libmojave
All checked builds pass sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
General-purpose OCaml library from the MetaPRL and OMake projects
Install
dune-project
Dependency
Authors
Maintainers
Sources
1.1.1.tar.gz
sha256=31ccec07b5b61d88e951985be9250b968d01277afac40978fa690ba7b6a94288
sha512=b96bfb29829e9677cbc6ff46c73f3dc90e255c079ec8f3667fd1d6b1d5f7d8c3a335d0d731f07d33eca692f3d27eac15c80197512711d79532899033413ab873
doc/CHANGES.html
Changes
1.1.1 (2026-11-01)
Fixed
Lm_readline.readlinewithout GNU readline (every dune build:READLINEis never defined) read stdin with a fixed 1,023-bytefgets, so a line of 1,022 characters or more came back in pieces, the rest as further lines. metaprl'smpshell reads its input this way, and a command over that length failed to parse. It now reads the whole line, however long (test/test_readline_long.ml). Shorter lines, a last line with no newline, and end of file are unchanged.- On the same path the line came back WITH its newline, while GNU readline returns it without. metaprl's shell is written for the second: its
\line continuation tests the line's last character, so it never fired.readlinenow returns the line without its newline on both paths. Lm_unix_util.getlkpassed itsUnix.lock_commandstraight tofcntlas the lock type, though the two are numbered differently (and fcntl's numbers differ between platforms). On macOSF_ULOCK,F_RLOCKandF_TRLOCKfailed with EINVAL andF_LOCKasked about a read lock. It now asks about a read lock forF_RLOCK/F_TRLOCK, a write lock otherwise, and refusesF_ULOCK(test/test_getlk.ml). Nothing in libmojave, metaprl or omake calls it.Lm_mmap.to_byteswrote the block header's size in 4-byte words, so on a 64-bit system the bytes it returned claimed twice the 8 MiB mapping andBytes.lengthread past its end (a segfault). It now counts words ofsizeof(value)bytes: the length is the mapping less one word and one byte (test/test_mmap.ml, which also reads back bytes written through it).Lm_mmap_pipe.open_clientsent the client its accept byte and only then cleared the shared buffer's flags, so a client that wrote at once could have its first message erased (the server then read nothing). It now clears the flags first. Found bytest/test_mmap_pipe.mlfailing on CI; a delay placed between the two steps makes the old order fail every time and the new one pass.Lm_mmapon Windows reserved its write mapping (SEC_RESERVE) but recorded its size as 0, soto_bytesbuilt a header of -1 words and the firstBytes.lengthfaulted; and it released the mapped view withVirtualFree, which is never valid for one. It now maps the whole region committed, as on Unix, and releases the view withUnmapViewOfFile(#125;test/test_mmap.mlruns on Windows again).Lm_ssl.shutdownwithout SSL (every dune build) did nothing, while with SSL it closes the sending side afterSSL_shutdown. A peer waiting for end of file aftershutdown(metaprl'shttp_simple,proxyedit) waited untilclose. It now closes the sending side too (test/test_ssl_plain.ml, which drives the plain-socket path metaprl's browser server runs: listen, connect, accept, text both ways).
1.1.0 (2026-10-30)
Fixed
Lm_rformat.format_quoted_stringprinted only the first character of a string that needs quoting ("two words"was shown as"t"), and escaped a tab as\r(#23). It now prints the whole string, escaping a newline, a carriage return, a tab and a double quote. metaprl's display forms use it for variable and operator names (refiner/reflib/dform.ml,simple_print.ml).Lm_list_util.remove_suffixreturned[]where the prefix is expected (remove_suffix [1; 2; 3] [3]was[]); it now returns[1; 2](#25).Lm_list_util.splitup nmade chunks of n+1 elements, last chunk first. It now makes chunks of at most n elements, in order (splitup 2 [1; 2; 3]is[[1; 2]; [3]]), and raisesInvalid_argumentfor n <= 0 (#25). Nothing in libmojave or metaprl calls either function.Lm_location.union_loc l1 l2tookl1's start andl2's end whatever their order, so the result need not cover both:union_loc (2:4-2:9) (1:0-1:5)was the backwards span2:4-1:5. It now takes the earlier start and the later end (#27). Its caller,Lm_parser's semantic actions, unions a reduction's symbols from the last one down, so every reduction's location ran backwards: for1+2theaddaction received columns 2-1. It now receives 0-3 (test/test_parser.mlrecords each action's location).%binLm_rprintf/Lm_format(Lm_make_printf) passed the format"%b"and the string"true"or"false"to C'ssnprintf: glibc read%bas a binary unsigned int and printed the pointer's bits (undefined behaviour), macOS printed a literalb. The conversion is now formatted as%s, keeping flags and width:"%7b|"gives" true|"(#32).Lm_imp_dag.ImpDag.deletenever removed the node: it built the shrunk array without storing it, yet renumbered every edge list as if the node were gone, so the graph was corrupted (deletingbfroma->b->c, a->dleftapointing atcand lostdfromsort). It now removes the node and renumbers the remaining edges (#42). metaprl does not calldelete.Lm_interval_set.DenseIntervalSetgave wrong answers for most set operations (#45), found by checking it against a brute-force model:isectalways returned the empty set,subtractreturned pieces of the second set,unionkept duplicate and overlapping intervals (itsnormalizehad been commented out by an unclosed comment), comparing a closed right bound with an open one returned "equal" for different points, andof_intervalkept an empty interval such as[14,6]as if it had members. It now followsCountableIntervalSet, which agreed with the model throughout. Nothing in libmojave or metaprl instantiates either functor.Lm_splay_linear_set(#46), found by checking it against a list model besideLm_array_linear_set, which agreed throughout:append_list t1 l t2usedt2in place oft1and numbered the new elements one too low ([1;2;3] [10;11] [7;8]gave[7;8;10;11;7;8]);lazy_sub_map f t i lendropped elementi; and the right part ofsplitcould not be indexed (getraised) because its offset had the wrong sign, whilefoldreported the indices of such a part unshifted.Lm_flags: setting a flag did not check its type, so an integer could be stored on a Boolean flag, which then failed everyget_bool; it now raisesFailurenaming the flag's type.flags_set_expr "nope=3"on an undefined flag reported an invalid value; it now reports that the flag is not defined, as"nope=true"already did (#47).Lm_file_util.parse_path dir namereverseddir:parse_path ["usr"; "lib"] "x"was["lib"; "usr"; "x"], and..removed the first directory instead of the last. It now keepsdirin order (#48). Nothing in libmojave, metaprl or omake passes adir.Lm_splay_set(#49):intersectpansweredtruefor any two sets of more than one element when the first was the smaller (it searched the first set for its own root), andunionandintersectpcompared keys with the polymorphiccompareinstead ofOrd.compare, so under any other order they went wrong.Lm_small_set(#49):addandof_listkept duplicates while the set was a list (add 25, 25, 9had cardinal 3). Found by checking everyMinimalSetSigimplementation against a model; nothing in metaprl uses these three modules.Lm_index(#52):mem_listraisedNot_foundwhen an intermediate key was missing; it now answersfalse.is_emptywasfalsefor an index whose every key had been removed; it now checks the table. Nothing in metaprl usesLm_indexor the symbol indexes built on it.Lm_serial_map.removeof an absent key raisedNot_found; it now returns the map unchanged, asLm_mapdoes (#54). Nothing usesLm_serial_map.Lm_splay_linear_set, after #46 (#56):collectplaced a part taken from another set without shifting its indices (whole parts, and parts that run to the end of their set), andappend_listwith an empty middle list (join) shifted the second set one place too far, soget,splitandfoldon such sets read the wrong element or raisedInvalid_argument "Linear_set.splay - index out of bounds". That exception is the one metaprl's proof census raised withSEQ_SET = Lm_splay.Lm_rformat_texdid not escape~, which TeX reads as a non-breaking space, so a literal tilde disappeared; it is now written\char126(#30).Lm_format.bprintf(and soLm_rprintf.bprintf) wrote nothing: it printed to a formatter on the buffer and never flushed it. It now flushes at the end, asFormat.bprintfdid (#33).Lm_format.sprintfdiscarded the string a%aor%tprinter returns (sprintf "pair=%a" pp xgave"pair="); it now prints it, asPrintf.sprintfdoes (#33). A new functorLm_make_printf.MakePrintfResulttakes the arguments ofMakePrintfplusprint_result;MakePrintfis unchanged.%S,%Cand%BraisedInvalid_argument "parse_spec". They now print asPrintfdoes: an OCaml string or character literal, and a Boolean (#33). Nothing in libmojave or metaprl calls these with%a,%t,%S,%Cor%B, and none callsLm_format.bprintf.Lm_thread_event: achoosethat blocked returned the value of its outermostsendarm even when a different arm completed:choose [receive c2; send c1 ()], completed by a sender onc2, returned the send arm's value and lost the received one. A send arm now sets the result only when its own write was taken (#34). metaprl's ensemble code chooses between events (remote_ensemble.ml).Lm_thread_event.syncandpollwrote two debugging lines to stderr (Lm_thread_event.lock,Lm_thread_event.unlock) on every call; they no longer do (#34).Lm_thread_event: asyncthat failed (it raisesInvalid_argument "Event.sync") left its queued send or receive live, so a later peer completed against it: the value of a failed send could still be received, and a later send could hand its value to a receiver that had already given up. A finishedsyncnow marks its entries performed (#39).Lm_thread_eventwaited on its condition variable once, so a spurious wakeup (whichConditionallows) madesyncraise. Under system threads it now waits until a peer has performed the communication (#39). No test can produce a spurious wakeup, so this half is not pinned; under null threadssyncstill waits once and raises, as pinned.Lm_thread_shell.create_or_find id i, when(id, i)did not exist, created(id, n)withnthe first free number, so it never found what it created (create_or_find "c" 5twice gave(c,1)and(c,2)). It now creates(id, i)(#35). metaprl restores saved shell sessions with it (support/shell/shell_current.ml), so a saved session's number changed on restart.Lm_digraph.coalesce_nodes n mlost a self-loop onmand left the deletedminn's predecessors, soin_degree ncounted it andpred nreturned it (#57).delete_noderemoves the loop fromm's successor list but not its predecessor list, and coalesce read both after the deletion. It now reads them first and mapsmton: a loop onm, like an edge between the two, becomes a loop onn. Nothing in metaprl or omake usesLm_digraph.Lm_large_array.LargeArray.setat an index past the end grew the array and dropped the value, soset a 5 xon a new array leftget a 5the default (#58). In bothLargeArrayandLm_large_array_weak,setandgetat exactlylength araisedInvalid_argument "index out of bounds"(or"Weak.set"), because the bound test wasi > length; soset a 0 xraised on every new array.setnow grows the array wheni >= lengthand then stores;getpast the end raisesInvalid_argument "LargeArray.get". The one user isLm_marshal_shared(not in metaprl or omake). Not tested: the second level, used only for arrays longer thanSys.max_array_length; its bucket count(i + max_length - 1) lsr max_shifthas the same boundary at anithat is a multiple ofmax_length.Lm_splay_table(#59):unionput the second table's data for a shared key first when the second table had one node, and the first table's data first in every other case, sofindandfind_allon a union depended on the tables' shapes. The first table's data now always comes first.unionalso compared keys with polymorphiccompareat two sites, not the table's own order: under a descending order 170 of 500 random unions lost or misordered keys. Andreplace t k []left a node with no data, so the table's next lookup or add raisedInvalid_argument "Splay_table.new_node : empty data"; it now removesk, asremovedoes when a key's list empties. metaprl's users (supinf.ml,itt_omega.ml,term_eq_table.ml) are not affected: supinf's keys are non-negative integers ordered ascompareorders them, and itsappendadds the two coefficients.Lm_parser.remove_production, removing a name's last production, left the name bound to no productions, so the grammar went on treating it as a nonterminal: a syntax-error message no longer listed it among the possible tokens (#63). The name is now unbound again, and the grammar equals the one that never had the production.Lm_map'smapi_all, which keeps an emptied binding, is unchanged. Nothing in metaprl callsremove_production.Lm_imp_dag.node_relcached a relation it found by search as an edge in its first node's own lists (#64). So a query changed whatnode_out_edges,node_in_edges, the sweeps andsortreturn, and the cached edge outlived adelete: afternode_rel a c(a < c through b) anddelete b,node_rel a cstill answeredLessThan. The cache now has its own fields, cleared whenever an edge is added or a node deleted.node_rel's answers are unchanged otherwise; metaprl's callers (mllib/precedence.ml,auto_tactic.ml) use onlynode_rel.Lm_big_int, the bignum underLm_num(#65):div_big_intwas one too small in magnitude when the divisor was 1 or -1 (-32565696657 / -1gave32565696656): its binary search ran below the dividend, which is the quotient for those divisors.mod_big_intgave the remainder the sign of the quotient, soa = b * (a / b) + a mod bfailed whenever the divisor was negative (-34063 mod -8was7). The remainder now has the dividend's sign, as OCaml'smoddoes and asdiv_big_inttruncates.- A zero result could be negative (
-5 * 0, and zero quotients and remainders), which prints0but is not equal to zero and compares below it. Zero results are now+0. to_int32dropped the sign, andof_int32 Int32.min_intdid not terminate.Lm_numcomputes small operands with OCaml's/andmodand hands the rest toLm_big_int, and it makes any product with an operand of 2^15 or more aLm_big_int. So before this it disagreed with itself at small sizes:(-17) mod (-10)was-7, while(40000 * 3) mod (-7)was-6where OCaml'smodgives6, and a large value times0was not equal to0. Both paths now agree. Not changed:integer_big_intraises for magnitudes of 2^30 and above, on any word size.
Lm_int_util.log2did not terminate for arguments of 2^61 and above (on a 64-bit system): it searched for the first1 lsl jabove the argument, and1 lsl 62ismin_int(#66). The search now stops at the largest power of two. Its callers areLm_large_arrayandLm_large_array_weak, withSys.max_array_lengthand with the index given toset, soset a (1 lsl 61) xreached it.Lm_cycle_dag(#67):equatewith one known name added the other to the class's names but not to its table, sofindon the new name raisedNot_found, and a laterinsertcould close a cycle through it without raisingCycle. Aninsertthat raisedCyclehad already added leaves for some of its children. Andequate x xon a new name listedxtwice. Now the new name is added to the table,insertchecks every child before changing anything, andequate x xlistsxonce. Nothing in metaprl or omake usesLm_cycle_dag.Lm_hashtbl_util.add_hashtbl dst srcgavedstsrc's oldest value for a key with shadowed bindings, not its current one (#68): it walked every binding withHashtbl.iter, which presents a key's bindings newest first, removing and re-adding each. It now copies each key's current value. Nothing in libmojave, metaprl or omake calls it.Lm_loop(#70): an edge into the root madecreateraiseInvalid_argument "index out of bounds", and a listed node that the root does not reach gave wrong immediate dominators (with0 > 1,1 > 3and an unreachable2 > 3, the idom of3was0, not1), and on some graphs overflowed the stack. The depth-first walk tooksdno = 0to mean "not visited", which the root and every unreached node also have. It now keeps its own visited marks, the vertex array holds only the nodes it reached, and predecessors it did not reach are ignored. A brute-force model over 1,500 random graphs agrees, with edges into the root and unreachable nodes listed.Lm_loop.loop_nest(#73) raisedInvalid_argument "build_trace"when no node hung under the root (a root with no successors), kept only each node's innermost back edge (so a node closing two loops left the outer one out), and built a loop's body along the latch's immediate-dominator chain (so the nodes on a branch inside a loop were put outside it). It now computes natural loops: the body of a header is the header and every node that reaches one of its latches without passing it, and each node sits in the innermost body containing it. A model of natural loops over 1,500 random graphs agrees.Lm_db.append_entryon a new file wrote its entries with no file header (#71).find_entrythen found none of them, and the nextremoveorremove_entry, seeing no header, truncated the file to the header alone, discarding them.append_entrynow writes the header first on an empty file. omake, the user, calls onlyaddandfind, which were right.Lm_parserended a parse early (#77). A state holding one complete item whose lookahead is only end-of-input is reduced without reading a token, and the parse returned that reduction's value. That is right for the start productionprog -> S $eof, but withS -> athe parser acceptedaaandabasS(a), reading one token and never reducingprog; and withprog -> a prog | b $eofit returned the innerprogforab. The parse now ends only when the start symbol is reduced onto an empty stack. metaprl'sfilter_grammarruns theory grammars throughParser.parse.Lm_lexer's delimiters that look at the next character (\>,\y,\B) never matched at the end of a clause (#83):a\>matched neitheranora b. The clause's final state is reached only after the next character is read, and was dropped there; it is now recorded as a match that ends before that character. The marshalled types are unchanged (metaprl's magic check hashes them).Lm_lexer: a delimiter that looks at the previous character right after one that looks at the next, with no character between (a\>*,a\>\<,\<{1}), raisedInvalid_argument "close_next"when lexed (#83).add_clausenow refuses such a clause with aFailurethat says to write the look back first (both test one boundary:\>\>is\>, and\>\<never matches). An interval no longer re-enters its body once its count reaches the maximum, andr{0}never enters it; neither path could finish a match.- C stubs and the collector (#84).
lm_uname(run byLm_unameat start-up) andml_getrusageassignedField(v, i) = caml_copy_...(...), where the field's address may be taken before the allocation movesv; they useStore_field.caml_term_size(run byLm_termsizeat start-up, on stdout and stderr) leftcaml_alloc_small's fields uninitialised acrosscaml_failwith, which allocates whenever stdout is not a terminal; it sets them first. And on Unixml_getrusageprintedUser: ... System: ...to stderr on every call; it no longer does. Lm_rprintfandLm_formatprinted ints through a Cint(#87), so any value outside 32 bits came out wrong:%dofmin_intwith%00.3dgave000,%iofmax_intgave-1,%xof-1gaveffffffff.ml_print_intnow reads anintnat, adds the length modifier OCaml uses for it, and printsu x X ofrom the int's bits masked to its width, asPrintfdoes (%xof-1is7fffffffffffffff). metaprl callsLm_rprintfin 11 files.Lm_lexerlooped forever on a$or\'that can repeat (a$*,a\'*,a($)+) at the end of input (#88): the end marker never runs out and the machine kept a transition on it. A scan now stops when it would read the end marker again from a state it already read it from. metaprl's lexer clauses use$only inside brackets, as a character.Lm_numat the int edges (#89). AnIntholdingmin_int(fromnum_of_int, or arithmetic that lands on it) overflowed:neg_num,abs_numanddiv_num min_int (-1)returnedmin_int; they now return the bignum.power_numwith a negative exponent counted the exponent down and never reached zero (it looped, allocating); it now raisesInvalid_argument. metaprl's integer arithmetic usesLm_num.Lm_string_util.equal_substring s1 off s2with a negativeoffpassed its range check and reads1atoffwithString.unsafe_get, outside the string; with an emptys2it answered true (#90). It is now false for a negative offset. Nothing in libmojave or metaprl calls it.Lm_index.filter_remove(andfilter_remove_iand the_entryforms) removed the key when the filter returnedSomeand kept it unchanged onNone, discardingSome's value (#96): the opposite ofLm_map.filter_remove, and the only reading under which the type'a -> 'a optionmeans nothing. It now followsLm_map:Noneremoves,Some dkeeps the key withd;removeandremove_entryare unchanged in effect. The interface now says so. Nothing in libmojave or metaprl calls it.Lm_symbol.string_of_ext_symbolandLm_symbol_hash.string_of_ext_symbolappended a symbol's number without the underscorestring_of_symbolputs after a name that ends in a digit, so different symbols printed the same:("x1", 2)and("x", 12)were bothx12(#97). They now printstring_of_symbol's form (x1_2), quoted as before when it has other characters.Lm_symbolalso had two identical definitions of it. Nothing in libmojave or metaprl calls it.Lm_channel's buffer refill (#99) asked the reader for 4,096 bytes whatever the buffer's size, and a string channel's buffer is the string itself, so afterset_io_functionson a string channel reading raisedInvalid_argument. On Windows, in text mode, a full read ending in\rread one more byte one past the buffer, so a CRLF file whose\r\nstraddled a 4,096-byte boundary raised. The refill now reads into the buffer it has and, in text mode, leaves room for that byte, as the lexer's refill already did.Lm_glob: a negated class[!...]was passed to the regex engine as a class containing!(#100), soglob "[!a]*.ml"returneda.ml, the one file it should exclude, andGlobIgnore/GlobAllowpatterns with one misbehaved the same way. It is now translated to[^...].Lm_formatagainstFormat(#101):pp_print_break n ohandedLm_rformatits two strings in the wrong order, so a break not taken printedospaces instead ofn. A flush orprint_newlinewith a vbox, hvbox or hovbox open raised "unbalanced buffer" (it closed one zone and no margins); it now ends every open box, asFormatdoes, andclose_boxwith no box open is ignored, as inFormat. InLm_rformat, a break in a zone that cannot break (a linear zone, which is whatLm_format's hbox is) printed a single space whatever its text, so a cut in an hbox printed a space; it now prints the break's not-taken text, asLm_rformatalready did when printing a linear zone. metaprl's display forms go throughLm_rformat; the existingLm_rformatpins are unchanged.Lm_fs_case_sensitive.case_sensitiveon macOS (#102) read the volume's capabilities 4 bytes off — its result header was anunsigned longwheregetattrlistwrites a 4-byte length — and so answered wrongly: "case-sensitive" for this machine's case-insensitive volume. It also kept a pointer into the OCaml string while the runtime lock was released. The header is now 4 bytes and packed, the path is copied first, andATTR_VOL_INFOis set asgetattrlistrequires. macOS is the only platform where it is available, and CI does not run there: the test's check is local.Lm_unix_util.copy_fileraisedUnix.fchmod not implementedon Windows, so it never copied a file there (#102, found by the new test's Windows jobs). It now sets the mode withUnix.chmodafter closing the file on Windows, and withUnix.fchmodelsewhere as before.Lm_thread_pool(threads profile, #105):waitpid idwaited only while the job was running, so on a job still queued (any job just created: the workers cannot take one until the main thread waits) it returned before the job had run. It now waits while the job is queued or running. A worker woke the main thread only when a visible job finished, sowaitpidon an invisible job (create false) that was running never woke; every job's end now wakes it. Nothing in libmojave or metaprl calls it.Lm_big_int.big_int_of_string(#106): a decimal string with a leading zero lost the digit after it ("0123"was 23,"-0123"-23): the test for a0b/0o/0xprefix skipped two characters whatever followed. And"-0"made a negative zero, which printed0and was zero byis_zero_big_intbut was noteq_big_intto 0 and compared below it. Both fixed.Lm_num.num_of_string, which metaprl uses, already normalized"-0".Lm_rawint(#91): the signed cast tested whether the 64-bit value was negative instead of sign-extending from the precision's top bit, so a signed 8-, 16- or 32-bit value out of range stayed out of range: every constructor (of_int Int8 true 200was 200, not -56) and every overflowing operation (Int8 127 + 1was 128, not -128).of_stringdid not cast at all (Int8unsigned"-1"was -1, not 255). For unsigned 64-bit values,absnegated,divandremdivided signed (max / 2was 0) andcompare,minandmaxreversed two values above 2^63. A signedfieldORed the sign mask in whatever the field's top bit (field 5 0 4was -11, not 5);set_fielddid not cast, and a 64-bit field shifted by 64. Through the cast,Lm_fmarshalread a negative signed 8-, 16- or 32-bit rawint back as positive. All now follow C's conversions;test/test_rawint_model.mlchecks them against an Int64 model. metaprl's MCC FIR theory (theories/experimental/mcc/fir/type/m_rawint.ml) reduces rawint arithmetic with these functions.Lm_float80.to_int(and soLm_rawfloat.to_int) returnedInt_val(val)where it neededVal_long: an untagged machine word, not an OCaml int (7.0 read as 1) (#92). It now returns the truncated value, throughintnatrather than a 32-bit Cint.Lm_rawfloat.of_rawintof an unsigned 64-bit value at or above 2^63 negated the signed value instead of adding 2^64 (2^64 - 1 gave 1.0).Lm_float80.to_stringprinted%Lg, six significant digits, soof_string (to_string x)lostx; it now prints the fewest digits that read back exactly, andof_stringreads withstrtoldrather thanstrtod. metaprl's MCC FIR theory stores a rawfloat in a term this way.Lm_float80.compareanswered -1 whenever either side was NaN, so it was not an order; NaN now equals itself and is below every other value, as in OCaml'scompare.Lm_marshal_buf.Bufnever terminated on a write (#94):createset the block's end to 0 and nothing reset it, so the firstwrite,write_int,write_int2orwrite_tagfound no room, started a new 64 KB block and retried, forever (onewrite_intreached 34 GB in 5 s). Blocks now end at the block size;to_statickeeps only the written part of each block; a word that does not fit starts a new block (it could run past the end), and the reader moves to the next block for one;write_int2retried aswrite_int, losing its tag. Nothing in libmojave or metaprl calls it (Lm_marshal_shared.XMarshal, its client, exports nothing).Lm_string_util(#95):strpat buf start len patcompared an absolute position with the relativelen, so a search fromstart > 0stoppedstartcharacters early.split_mime_stringtested forlen_b - 2characters left where a delimiter needslen_b + 2, so it read past the end: a body without a final delimiter raised "index out of bounds" (metaprl's HTTP server splits multipart bodies with it); it now returns the parts found.concat_argv,string_argvandquote_stringleft a string unquoted when its quotes balanced (a"b c"d,'a b'), butparse_argshonours only a double quote that opens a word and no single quotes, so the string split in two. They now quote any string with white space or a quote, unless it is wrapped in double quotes, which the interface passes through as already quoted.Lm_lexer.unionnumbered the second lexer's clauses in reverse order (#78), so between two of its own clauses that match the same text the other one won. Withchoose = max, which metaprl'sfilter_grammaruses, a lexer adding[a-z]+and thenletlexedletas the keyword alone and as the identifier after a union. The second lexer's clauses now keep their order.Lm_lexer.searchandsearchtodid not find the first occurrence of a match, as the interface says (#80). Among the matches that started before the first one ended, they took the one that ended last:>>in>>>was found at offset 1,ab|bcdinabcdgavebcd, and<<in<<<x>>>at offset 1. They now try a match at each offset from the start and take the first offset where one is found, the longest match there. metaprl'sfilter_grammarusessearchtoto find the end of a quotation.Lm_lexer's\( \)arguments (#82). The branches of an alternation number their groups from the same start (they must have equal counts, and the arity counts the first), butlexreported each group by its position in the whole expression:\(a\)\(b\)|\(c\)\(d\)(arity 2) gave["", "", "c", "d"]oncd. And a group that took no part in the match was left out, so\(a\)*b(arity 1) gave[]onb. The i'th group of the branch that matched is now argument i, and the arguments are padded with""to the arity, inlex,searchandsearchto. metaprl's one lexer group (a quoted string) is unchanged.
Tests
Lm_list_utilis pinned (test/test_list_util.ml, #21): slicing, searching, maps and folds, two- and three-list operations, set-like operations and association lists, including their exceptions on empty lists, out-of-range indexes and mismatched lengths.Lm_rformatis pinned (test/test_rformat.ml, #22): documents built from each zone and break kind, rendered as text at widths 80, 20, 10 and 4, the calls a backend printer receives (including tags and invisible text), buffer cloning and clearing, zone depth, and a marshal round trip.Lm_array_utilis pinned (test/test_array_util.ml, #24): searching,replace, appends,sub_map,collectanddistinct, including their exceptions on empty arrays and out-of-range indexes.Lm_locationis pinned (test/test_location.ml, #26): creation,dest_loc,bogus_loc, printing (one line and several),compareandunion_loc.Lm_splay_tableis pinned (test/test_splay_table.ml, #28), the table metaprl's refiner uses for term tables: every operation ofTableSigon several insertion orders and repeated keys,union, and a 200-key table after insertions and removals.- The
Lm_rformatHTML and TeX backends are pinned (test/test_rformat_backends.ml, #29): documents with special characters, breaks, indentation, tags and invisible zones, rendered as HTML (with and without a tagger) and as TeX at two widths, andLm_rformat_html.escape. Lm_rprintfandLm_ref_utilare pinned (test/test_rprintf.ml, #31):sprintf/bprintfon each conversion, compared withPrintf.sprintf, the string channelstdstr, the list printers,output_rbufferand boxes. #33 addsbprintfwithout%a,%t, a%aprinter that callssprintf, and padded%S/%B, pinned before the fix.Lm_thread_eventis pinned under thethreadsprofile (test/test_thread_event.ml, #34): channels,poll,sync,wrap,choose,select,sequenceandsequence_final, including a blockedchoosecompleted by a sender and by a receiver, with each arm order.Lm_thread_shellis pinned (test/test_thread_shell.ml, #35): job creation, hidden and visible jobs,get_pids,make_pid,with_pid,with_current,set_pidandcreate_or_find, in both thread profiles.Lm_thread_eventis pinned under null threads too (test/test_thread_event_null.ml, #39): a blockingsyncraises, and a failedsyncleaves nothing for a later peer.Lm_debugis pinned (test/test_debug.ml, #36): creating, loading, setting and listing named flags, a flag set before it is created (set_possible_debug),debug_level,set_debug_flagsandtiming_wrap.Lm_string_setis pinned (test/test_string_set.ml, #37): both string orders (length first, andStdlib.compare), and the multi-value tables (Lm_map.LmMakeList), which no test exercised before.mapi_allcan leave a key bound to an empty list, wherememis true andfindraisesNot_found; it is pinned as it stands.Lm_traceis pinned (test/test_trace.ml, #38): conversions, the maps, folds and iterations with and without depth,fold_map,header_nodes,special_nodesandpp_print, on one tree of three levels.- Both linear sets are checked on composed operations (
test/test_linear_set_compose.ml, #56): sets built by random histories of every operation, as the refiner builds them. Lm_array_linear_setandLm_splay_linear_setare checked against a list model (test/test_linear_set.ml, #46): every operation, and indexing the results ofsplit,concat,append_listandlazy_sub_map.Lm_flagsis pinned (test/test_flags.ml, #47): registering, getting and setting flags, andname=valueexpressions with their errors.Lm_file_utilis pinned (test/test_file_util.ml, #48): path parsing and building, and reading, writing and finding files. A path list cannot express an absolute path, sopath_dir "/usr/lib/x"is"usr/lib"; pinned as it stands.- The
MinimalSetSigimplementations are checked against a model (test/test_min_sets.ml, #49):Lm_set,Lm_splay_set(in two orders),Lm_hash_setandLm_small_setover two bases. Lm_dlistis checked against a model (test/test_dlist.ml, #50): 30,000 random inserts and deletes over 8 handles, the list read four ways after each step.Lm_bitmatrixis checked against a model (test/test_bitmatrix.ml, #51): 30,000 random adds, removes and queries on matrices of random size.Lm_indexis pinned (test/test_index.ml, #52): chains, lookups at one and several levels, removal,filter_addand persistence.Lm_listbufis checked against a list model (test/test_listbuf.ml, #53): 5,000 random histories of every operation.Lm_serial_mapis checked against a model (test/test_serial_map.ml, #54): 15,000 random adds and removes against an association list in insertion order.Lm_graphis checked against a model (test/test_graph.ml, #55): 10,000 random node and edge additions and deletions, with degrees, neighbours, queries and depth-first reachability after each.Lm_int_setis pinned (test/test_int_set.ml, #40): sets, tables and multi-value tables over keys that includemin_intandmax_int.Lm_printf_rbufferis pinned (test/test_printf_rbuffer.ml, #41): a document printed at the default width of 80.Lm_imp_dagis pinned (test/test_imp_dag.ml, #42): building, roots, sort, the sweeps,node_relanddelete.node_relcached a derived relation as an edge in its first node's lists, so a query changed whatnode_out_edges,node_in_edgesand the sweeps return; fixed in #64.Lm_symbol_matrixis pinned (test/test_symbol_matrix.ml, #43): the pair set and the symmetric and asymmetric pair tables, includingcopy,filter_add,filter_remove,mapandfold.create 0makes a table whose firstaddraisesDivision_by_zero; pinned as it stands.Lm_inetis pinned over loopback (test/test_inet.ml, #44): serving on an ephemeral port, connecting, accepting, data both ways, the peer and local ports, and connecting to a closed port.Lm_interval_setis checked against a brute-force model (test/test_interval_set.ml, #45): both functors, every set operation, 12,000 generated cases; the test prints the number of disagreements per operation.Lm_field_tableis checked against models (test/test_field_table.ml, #61): 4,500 random steps for each ofFieldTableandFieldMTable, with lookups, the index order ofto_list, the iterators,replace_extandmapafter each.- The rest of
Lm_hashis checked against models (test/test_hash_cons.ml, #62):MakeHashCons(dense indices,get,fold,map_array),MakeHashMarshalEqwith a fine and a coarse equality (items marshalled before use included),compare_int_listandhash_int_list. Lm_big_intis checked against native ints (test/test_big_int.ml, #65): 4,000 random pairs for each operation, the division identity, identities beyond native ints, andLm_num's two paths.Lm_symbol_hashis checked againstLm_symbol(test/test_symbol_hash.ml, #66) on 3,000 random names, marshalled symbols included, andLm_int_util.log2against a floor log2 at every power of two and its neighbours.Lm_cycle_dagis checked against a model (test/test_cycle_dag.ml, #67): 4,800 random insert and equate steps, with the cycle refusals,findand the ordersortgives.Lm_hashtbl_utilis checked against a model (test/test_hashtbl_util.ml, #68), on tables with shadowed bindings.Lm_argis pinned (test/test_arg.ml, #69): 25 argument vectors under both option modes, with every effect of the spec and every exception.Lm_loop's dominators are checked against a brute-force model (test/test_loop.ml, #70), and the loop nest of one graph is pinned.Lm_dbis checked against a model over a scratch file (test/test_db.ml, #71), with the predicate API on fixed histories.Lm_attributeis pinned (test/test_attribute.ml, #72): two downward attributes compose in the order they are applied, anddest_coreanddest_upcache their results.Lm_parse_idis pinned (test/test_parse_id.ml, #74): a CVS$Id$string with a doubled space is malformed, as is a short one.Lm_format_utilandLm_print_utilare pinned (test/test_print_utils.ml, #76): paragraphs at a narrow margin, the y formatter, and separated lists.Lm_digraphis checked against a model (test/test_digraph.ml, #57): 8,000 random steps, coalescing and multi-edges included, with degrees, successors, predecessors, queries, paths and the depth-first orders after each.Lm_large_arrayandLm_large_array_weakare checked against a model (test/test_large_array.ml, #58): 3,000 random sets each, with indices at the sizes where the arrays grow.Lm_splay_table.MakeTable(throughLm_table_util.MakeTable) is checked against a model (test/test_table_compose.ml, #59): 6,000 random steps over a pool of tables, older versions re-checked after later steps, and 500 unions under a descending order.Lm_string_hash(Lm_hash.MakeHashMarshalover strings) is checked against a model (test/test_string_hash.ml, #60): 3,000 random strings, some marshalled before use, and 8 pairs of distinct strings with the sameHashtbl.hash, with intern, equal, compare, sets and tables after each.Lm_parseris checked against an Earley recognizer (test/test_parser_model.ml, #77): 300 random grammars (145 build, the rest are refused with a conflict), every string of up to 5 tokens, acceptance and the derivation the actions build, the same afterremove_productionandunion, and 2,000 random expressions against a precedence-climbing evaluator.Lm_lexer's zero-width delimiters are checked against a model (test/test_lexer_anchors.ml, #83):^ \< \> \y \B \``` overa, space and newline in the random lexers oftest_lexer_model.ml. With only^and `` \`` the model agreed on every check; the delimiters that look at the next character did not, fixed above. Clauses thatadd_clauserefuses are checked against the model's own rule.- Three C stubs are called many times under a small minor heap (
test/test_cstubs.ml, #84); the hazards above depend on evaluation order and on where a collection falls, so the test guards the results and does not show the hazards. Lm_rprintfandLm_formatare checked againstPrintf(test/test_printf_model.ml, #87): 6,000 random conversions, limited to specs whose meaning OCaml and C agree on.Lm_lexer's$and\'are checked against a model (test/test_lexer_eof.ml, #88): matching the end marker consumes no text and counts as one more unit of length.Lm_numis checked against a separate bignum (test/test_num_model.ml, #89), itself checked against native ints first.Lm_string_utilis checked against references (test/test_string_model.ml, #90).Lm_lexeris checked against a brute-force matcher (test/test_lexer_model.ml, #78): 300 random lexers of up to 4 random regular expressions and\', every string of up to 5 characters, one call and a whole tokenization, the same afterremove_clauseandunion. At the end of the input\'wins over an empty match by any clause; the model does the same.Lm_positionis pinned (test/test_position.ml, #79): each constructor's location and printed form withdebug_posoff and on, and 2,000 random chains whoseloc_of_posis the same either way. No defect.Lm_lexer.search,searchtoandmatchesare checked against a model (test/test_lexer_search.ml, #80): the random lexers oftest_lexer_model.mlon every string of up to 5 characters, one call andsearchtorepeated to the end, and quotation-like delimiters underchoose = max.Lm_parser's precedence and associativity are checked against a model (test/test_parser_prec.ml, #81): 300 random tables of 1-4 levels (left, right or nonassoc) over six binary operators, 40 random token strings each, the parse tree against a precedence-climbing parser, where two operators of one nonassoc level side by side are a syntax error. No defect.Lm_lexer's arguments are pinned (test/test_lexer_args.ml, #82).Lm_rawintis checked against a model (test/test_rawint_model.ml, #91): 3,000 cases per operation over every precision and signedness, half of them edge values, against Int64 with C's wrap-around, and anLm_fmarshalround trip. Division by zero raisesDivision_by_zero; shift counts outside the width are not compared.Lm_rawfloatandLm_float80are checked against OCaml's floats (test/test_rawfloat_model.ml, #92): 3,000 cases per operation, arithmetic to within one ulp (long double is 80-bit on x86-64 Linux and 64-bit on Apple Silicon and MSVC), conversions and comparisons exactly.Lm_splayis checked against its stated semantics (test/test_splay.ml, #93): on 2,000 random search trees,splayat an element, between elements, below all and above all keeps the elements and their order, puts the cut between the two sides, and leaves both sides search trees;splay_maxandsplay_minreturn the extreme and the rest. No defect (a mutant of the zig-zag case fails 292 trees). The same file checksLm_rformat_raw's channel printer against its buffer printer and takesLm_thread_util's printer lock twice.Lm_marshal_buf.Bufis checked by round trip (test/test_marshal_buf.ml, #94): 300 random sequences (53,745 values) of ints, int2s, tagged values and byte strings, some longer than a block, read back in order. Values outside a word's bits lose the bits that do not fit; a tag above 255 raisesInvalid_argument.Lm_indexis checked against a model trie (test/test_index_model.ml, #96): 1,200 random sequences of every add and remove form, single level and along a path, plain and_i, compared after each step by every (path, datum) pair.Lm_symbolis checked by property (test/test_symbol_model.ml, #97): on 3,000 random symbols,addinvertsstring_of_symbol(how metaprl prints a variable and reads it back) andstring_of_ext_symbol;compare_pair/compare_tripleare lexicographic;new_symboland its variants give unused numbers;new_name_gen,reinternandis_interned; and the printers by pin.Lm_symbolandLm_symbol_hashdocumentadd,is_internedandreinternin their interfaces (#111). The tworeinterns differ:Lm_symbol.reinternisadd (to_string v)and drops the number,Lm_symbol_hash.reinternreturns the table's copy after unmarshaling and keeps it. Nothing calls either.Lm_arg's folding forms are checked against its plain ones (test/test_arg_fold.ml, #98): on 2,000 random argv vectors per spec mode,fold_argvwith the*Foldspecs logs the same effects, anonymous arguments and exceptions asparse_argv. No defect (a mutant that passesSetFoldfalse fails 75 and 275 vectors). Also the anonymous function's "rest" answer, andfold/parseon the program's own argv.- The rest of
Lm_channelis checked (test/test_channel_rest.ml, #99):of_substring,input_entire_lineandof_funby model (2,000 cases each), and locations underof_loc_string,set_lineandcreate_loc_string,lex_buffer,descr,set_io_functionsand a text-mode read across a buffer boundary by pin. - The rest of
Lm_globis checked (test/test_glob_rest.ml, #100):regex_of_shell_patternagainst a brute-force shell matcher (4,000 pairs), andglob_argv,list_dirs,list_dirs_rec,subdirs_of_dirs, the glob options,tilde_collapseandgethomedirby pin, with output the same on every platform. Lm_formatis checked againstStdlib.Format(test/test_format_model.ml, #101): on 2,000 random sequences of boxes, prints, breaks, newlines and extra closes, the same text (white space aside) at margins 1000, 30 and 10, and no exception; exact output where no break is taken; the setters, getters and output functions by pin.Lm_nocompare,Lm_id,Lm_fs_case_sensitiveand the portable part ofLm_unix_utilare checked by property (test/test_os_small.ml, #102).Lm_printf's own wrappers are pinned (test/test_printf_rest.ml, #103):out_channel_of_formatter,pp_print_any_list,eflushand the global output functions. The rest ofLm_printfis OCaml'sFormat.Lm_symbol_hashis checked by property (test/test_symbol_hash_model.ml, #104):addinvertsstring_of_symbol;compareis a total order agreeing witheq, andeqsymbols hash alike;compare_pair,compare_tripleandcompare_listsare lexicographic; fresh symbols,new_name_gen, andreinternkeeps the symbol. No defect (a mutantreinternthat drops the number fails 2,029 of 3,000).Lm_thread_poolis tested in both profiles (test/test_thread_pool.ml,test/test_thread_pool_null.ml, #105).- The rest of
Lm_numandLm_big_intis checked by property (test/test_num_rest.ml, #106): comparisons,is_zero,integer_num,is_integer_num,is_integer_big_int,neg_big_int,of_string,quo_big_int/rem_big_int. Lm_graph's traversals are checked (test/test_graph_dfs.ml, #107): on 300 random graphs,dfs_listis a preorder from its start,dfs_iteranddfs_foldfollow it, anditer/foldvisit each node oflistonce. No defect (a postorderdfs_iterfails 211 graphs).Lm_interval_set'sis_singleton,dest_singleton,is_total,max_set,is_enumandto_enumjoin its model test (test/test_interval_set.ml, #108). No defect (mutants making each predicate false fail 14 to 3,000 cases).Lm_parser.create_prec_ltis checked (test/test_parser_prec.ml, #109): the same random precedence tables built top-down with it parse the same 12,000 inputs as the precedence-climbing model. No defect (a mutant that makes itcreate_prec_gtfails 2,087).Lm_rformat'sformat_bound,format_azone,format_hspace,format_depth,format_flushandformat_flush_popmare pinned (test/test_rformat_rest.ml, #110).- The rest of
Lm_string_utilis checked (test/test_string_rest.ml, #95):parse_argsagainstconcat_argv,string_argvandquote_string, the hex-name round trip,hexify_subandstrpatby model (3,000 cases each), and the escapes, trims, MIME splitting, tokens,prepend,string_of_fileand the checkedmake/blit/getby pin.
Behaviour that the tests record and that may be a bug
Lm_rawfloat's precision is a tag only: aSinglevalue is not rounded to single precision, and arithmetic on it is done in long double (test/test_rawfloat_model.ml).remraisesFailure "Not supported".Lm_float80.blit_float80asserts that a long double is at least 10 bytes, which aborts where it is 8 (Apple Silicon, MSVC); nothing calls it.- The argv quoting in
Lm_string_utilcopies a backslash as an escape already written, whichparse_argsthen reads as one, so a string with a backslash does not round-trip; andparse_args "a\\ b"(an escaped space outside quotes) raisesInvalid_argument(test/test_string_rest.ml). Lm_symbol.make "010" 0(an all-digit name with a leading zero, number 0) prints as010, whichaddreads as("0", 10);addnever makes such a symbol (test/test_symbol_model.ml).Lm_printfopens a file (open_out) but has noclose_out.Lm_formatlays lines out withLm_rformat's zones, notFormat's boxes: its vbox, hvbox and hovbox are one kind of zone, so where lines break differs fromFormat. Its tab boxes,print_tab,set_tabandprint_if_newlinedo nothing, andmax_boxes, the ellipsis andmax_indentare stored but not applied (test/test_format_model.ml).Lm_rformat.format_flushcloses one zone, though its comment says all.Lm_lexer: a group under?(x\(a\)?\(b\)) is accepted byadd_clauseand fails at the firstlexwith "mismatched argument counts":?is an alternation with the empty string (#82).Lm_lexer: a delimiter that looks at the next character (\>,\y,\B) at the end of a clause never matches (#83):a\>matches neitheranora b, whilea\>matchesaina b. The lexer reaches the clause's final state only after it has read the next character, and does not count it as a match.Lm_lexer: a delimiter that looks at the previous character reached right after one that looks at the next, with no character between (a\>*,a\>\<), raisesInvalid_argument "close_next"when it is lexed (#83).- C code that no build here compiles, read and not tested (#85). The dune build never defines
SSL_ENABLEDorFAM_ENABLED; the OMake build setsFAM_ENABLEDwhere inotify exists, and metaprl setsSSL_ENABLED = false.lm_notify.c'som_notify_monitor_directorypassesString_val(v_name)and a pointer into the connection's custom block to FAM insidecaml_enter_blocking_section, where another thread's collection may move either; the name should be copied first and the connection held outside the OCaml heap. Nothing in libmojave or metaprl callsLm_notify(omake has its own copy).lm_ssl.c's real code is compiled by neither build and was not read for the collector's rules. Lm_string_util.c_escapedwrites C escapes (octal\042for a double quote,\bfor backspace) andunescapereads OCaml's (decimal\ddd, no\b), so the two do not round-trip (#90). metaprl's display forms usec_escaped.Lm_field_table.FieldMTableassumes each internal name is added once. Two entries with one internal name maketo_listraiseFailure "FieldMTable.to_list: some fields are missing", andfind_intreturns the later entry (#61).Lm_arg(#69): an option argument that is not a number (-n xfor anIntoption) escapes asFailure "int_of_string"(or"float_of_string"), not asBogusArg, so a caller that catchesBogusArgto print its usage gets an uncaught exception instead. A lone-, often a name for standard input, is refused as an ambiguous option.Lm_arg's user is omake, which carries its own copy.
1.0.0 (2026-10-28)
The first release. It is the 2017 library, refreshed for current OCaml.
libmojave builds again, on a current OCaml. Nothing in the public API was removed, except Lm_dll (see below).
Building
Builds on OCaml 4.14 and 5.4 (#3, #4). OCaml 5 removed or renamed parts of the standard library and the C runtime API that the 2017 code used:
Pervasivesis nowStdlib.- The C stubs use the
caml_-prefixed runtime names;uerroriscaml_uerrorfrom OCaml 5 on. Format.bprintfandget_all_formatter_output_functionsare restored inLm_printfwith their OCaml 4.14 definitions, and the out-functions record carries OCaml 5'sout_indent.lm_mmapwrites its out-of-heap string header withCaml_out_of_heap_header.
- A dune build (
lib/,config/) alongside OMake, producing the same 108 modules and the same C stubs (#4).config/discover.mlrepeats OMake's C configuration checks. The OMake build remains, because MetaPRL builds libmojave as an OMake subdirectory. dune build --profile threadsselects the system thread implementation; the default is the null implementation, as in OMake (#7).- Builds on Windows with MinGW (#8). That build found a 64-bit Windows bug: custom-block callbacks used
long, which is 32 bits on Win64, where OCaml'sintnatis 64.ssl_info_hashtruncated the pointer it hashed, and the Win32socklen_tdid not match Winsock. - Builds on Windows with MSVC too (#13).
WIN32is now defined on Windows, as OMake does, so MSVC compiles the Win32 branches. - Warning flags in numeric form. Warnings added in OCaml 4.13 and later (67, 68, 69, 70) are not errors.
Fixed
Lm_config.codewas a NULL pointer instead ofByteCodeorNativeCode: its C stubs returnedInt_val(0)andInt_val(1)whereVal_intwas meant, and both are a raw 0. OCaml 4 ignored a pointer outside its heap; OCaml 5's garbage collector follows it and crashes the first full collection in any program that linksLm_config(all of libmojave is linked with-linkall, as MetaPRL's camlp5 drivers do). Before the fix, the value was never equal to either constructor.test/test_config.mlchecks it as bytecode and as native code.Lm_ctype's six C primitives (is_alnum,is_digit,is_graph,is_print,is_upper,set_locale) were declared but defined nowhere in libmojave, so a program linkingLm_ctypefailed to link. They are now incutil/lm_ctype.c, newly written from the C standard's<ctype.h>andsetlocale;test_ctypechecks every ASCII character. They follow the C library's locale tables, so platforms can differ: under MSVC's C runtimeis_print '\t'is true (MinGW, Linux and macOS say false), and the MSVC build compares against its own expected file.
Tests
Pinning tests in
test/(#5, #6, #7, #9, #11, #16) forLm_string_util,Lm_filename_util,Lm_glob,Lm_symbol,Lm_set,Lm_map,Lm_printf,Lm_lexer,Lm_parser,Lm_num,Lm_channel,Lm_thread,Lm_hashandLm_fmarshal.Lm_marshal_bufandLm_marshal_shared(C stubs) are not pinned.- Each test records a function's output on chosen inputs, as generated from the code at the time; the tests do not specify what the output should be.
- Each test was shown to fail when the code it covers was changed.
- They run on Linux (OCaml 4.14 and 5.4) and Windows. The filename and glob tests have separate expected output for Windows.
Not built
Lm_dll. Its C side redirectscaml_local_rootsfor stub code, and on OCaml 5CAMLparamno longer reads that variable.
Behaviour that the tests record and that may be a bug
None of these was changed. A fix will show up as a change to an expected file.
Lm_string_util.unescapehas no hex escapes ("\x41"becomes"x41").Lm_string_util.parse_args_listdoes not group single quotes, and raises ona\ b.Lm_glob.is_glob_string "{a,b}"is false, althoughglobexpands braces.Lm_glob.globraisesFailure "…: bad match"when nothing matches.Lm_symbol.to_string (add "x_1")is"x_".Lm_num.is_integer_numis false for an integer too large for anint.Lm_num.to_int32wraps silently.Lm_channel.tellandseekraiseUnix_error(EINVAL, …)on a string channel.Lm_parseraccepts only when the start production consumes the end-of-input token itself.Lm_fmarshalwrites anIntas 32 bits, soInt (-1)reads back asInt 4294967295andInt max_intis truncated.Lm_hash.HashCodegivesadd_int (-1)andadd_int max_intthe same code.
Repository
- Commit, branch-name and pull-request checks run on every push (#1, #2).
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page