Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate full error traces during module inclusion #10407

Merged
merged 10 commits into from Jun 22, 2021

Conversation

antalsz
Copy link
Contributor

@antalsz antalsz commented May 10, 2021

Introduction

This PR produces more detailed error messages during various kinds of module inclusion, taking advantage of the new structured error trace generation from #10170. Previously, these errors were “shallow”, ending as soon as there was an incompatibility; this patch makes them “deep”, reporting the reasons for those problems. For example, consider the following module:

module M : sig
  val x : bool * int
end = struct
  let x = false , "not an int"
end

This now produces the following error:

Error: Signature mismatch:
       Modules do not match:
         sig val x : bool * string end
       is not included in
         sig val x : bool * int end
       Values do not match:
         val x : bool * string
       is not included in
         val x : bool * int
       The type bool * string is not compatible with the type bool * int
       Type string is not compatible with type int

The last two bolded lines are new in this patch. Previously, the error message stopped two lines earlier, omitting the key detail that the reason there is an error is specifically that string is not equal to int.

This change brings module errors in line with ordinary type errors; indeed, the new, bolded part of the module inclusion error corresponds directly to the error trace produced for ordinary type errors. For example, in

let y = false, "still not an int" in
(y : bool * int)

the resulting error is

Error: This expression has type bool * string
       but an expression was expected of type bool * int
       Type string is not compatible with type int 

(These examples were also the example in #10170’s “Eventual goals” section, and the module M above now lives in the test suite as the first example in testsuite/tests/typing-misc/deep.ml.)

These improved error messages are generated for both moregen and type equality, and show up for every kind of module inclusion error: not just values with a different type in the signature, but constructors with different arguments, types with different parameters, classes with different methods, primitives with different names, and so on.

Code changes

This PR makes the following large-scale changes to the code:

  • The Errortrace.t type, which wrapped up the three kinds of error traces into a single GADT, is now no longer passed around directly. Instead, Errortrace exposes three new types, one for each kind of error: unification_error, equality_error, and moregen_error. Each of these record types contains a corresponding trace (t) in the field named trace; the equality_error also contains a substitution (subst). All types that contain explanations of errors contain these _error types (or the sum type comparison_error that wraps an equality_error or a moregen_error) instead of raw traces; traces are only handled directly if they’re being built (as in typing/ctype.ml) or consumed (as in typing/printtyp.ml). This also meant changing a number of variable names from trace or tr to err. The advantage of this change is that we can bundle the extra information we need into equality_error, and also that we can tell the three kinds of errors apart more directly.

  • The environment (Env.t) is propagated into the printing functions from outside, rather than maintaining duplicate copies of the environment alongside various errors.

  • There is new text for printing out new kinds of moregen and equality errors that were previously not printed, and the moregen and equality errors themselves have their traces printed. Some text was changed slightly (constructor mismatches went from “is not compatible with” to “is not the same as”).

  • A few new tests were added; these tests confirm that we print out longer traces for inclusion errors and catch some specific error cases that didn’t previously have tests.

  • Some code in toplevel/topdirs.ml was changed to use a local exception type instead of Ctype.Unify (not directly related to the printing, but part of the global exception inspection that was necessary for some of the other changes).

The changes are structured into two commits: first, a commit that adds the new tests; and second, a commit that makes the actual code changes and updates all the necessary tests.

Detailed, file-by-file changes

This section documents the changes I made to every file, since this PR touches so many of them; it is not required reading, but hopefully helps review. There is nothing after this section in this PR, so if you don’t want to read the gory details, you can stop now.

The key files to look at are, in roughly descending order, typing/includecore.ml, typing/ctype.ml, and typing/errortrace.mli, as well as, to a lesser extent, their .mli (or .ml) files. The test file which contains the greatest number of changed error messages is testsuite/tests/typing-modules/inclusion_errors.ml; all of the test files except for the four with new tests from the first commit just contain improved error messages.

  • .depend (modified):

    Inessential changes, autogenerated.

  • Changes (modified):

    The proposed change description (currently lacking “reviewed-by” information).

  • testsuite/tests/printing-types/disambiguation.ml (modified):

    Better error messages in test output.

  • testsuite/tests/typing-extensions/extensions.ml (modified):

    Better error messages in test output.

  • testsuite/tests/typing-extensions/open_types.ml (modified):

    Better error messages in test output.

  • testsuite/tests/typing-gadts/ambiguity.ml (modified):

    Better error messages in test output.

  • testsuite/tests/typing-gadts/pr7160.ml (modified):

    Better error messages in test output.

  • testsuite/tests/typing-gadts/pr7378.ml (modified):

    Better error messages in test output.

  • testsuite/tests/typing-misc/deep.ml (new):

    New tests that generate type errors within more complex types during module inclusion (e.g., the initial example in this PR), showing that we generate full traces for module inclusion.

  • testsuite/tests/typing-misc/enrich_typedecl.ml (modified):

    Better error messages in test output.

  • testsuite/tests/typing-misc/pr6416.ml (modified):

    Better error messages in test output.

  • testsuite/tests/typing-misc/pr6634.ml (modified):

    Better error messages in test output.

  • testsuite/tests/typing-misc/pr7668_bad.ml (modified):

    Better error messages in test output.

  • testsuite/tests/typing-misc/records.ml (modified):

    Better error messages in test output.

  • testsuite/tests/typing-misc/variant.ml (modified):

    Better error messages in test output.

  • testsuite/tests/typing-modules-bugs/pr7414_2_bad.compilers.reference (modified):

    Better error messages in test output.

  • testsuite/tests/typing-modules-bugs/pr7414_bad.compilers.reference (modified):

    Better error messages in test output.

  • testsuite/tests/typing-modules/Test.ml (modified):

    Better error messages in test output.

  • testsuite/tests/typing-modules/applicative_functor_type.ml (modified):

    Better error messages in test output.

  • testsuite/tests/typing-modules/extension_constructors_errors_test.ml (modified):

    Better error messages in test output.

  • testsuite/tests/typing-modules/functors.ml (modified):

    Better error messages in test output.

  • testsuite/tests/typing-modules/inclusion_errors.ml (modified):

    New test cases and better error messages in test output. Since I was improving module inclusion errors, this is the file with by far the highest number of improved errors, as well as with errors for the most different inclusion cases. I also added three new tests that show how inclusion of private polymorphic variant types can fail; these don’t reflect new behavior, just new error messages.

  • testsuite/tests/typing-modules/module_type_substitution.ml (modified):

    Better error messages in test output.

  • testsuite/tests/typing-modules/nondep_private_abbrev.ml (modified):

    Better error messages in test output.

  • testsuite/tests/typing-modules/pr10399.ml (new):

    This is a new test showing the new error traces, copied from issue Error message missing information about type inclusion #10399 by @jctis; the old error for this case was reported as a bug, and so I have copied the test case here so that we can see the improvement.

  • testsuite/tests/typing-modules/pr6394.ml (modified):

    Better error messages in test output.

  • testsuite/tests/typing-modules/pr7818.ml (modified):

    Better error messages in test output.

  • testsuite/tests/typing-modules/pr7851.ml (modified):

    Better error messages in test output.

  • testsuite/tests/typing-modules/records_errors_test.ml (modified):

    Better error messages in test output.

  • testsuite/tests/typing-modules/variants_errors_test.ml (modified):

    Better error messages in test output.

  • testsuite/tests/typing-objects-bugs/pr3968_bad.compilers.reference (modified):

    Better error messages in test output.

  • testsuite/tests/typing-objects/Tests.ml (modified):

    Better error messages in test output.

  • testsuite/tests/typing-poly/poly.ml (modified):

    Better error messages in test output.

  • testsuite/tests/typing-polyvariants-bugs/pr7817_bad.ml (modified):

    Better error messages in test output.

  • testsuite/tests/typing-private/private.compilers.principal.reference (modified):

    Better error messages in test output.

  • testsuite/tests/typing-private/private.compilers.reference (modified):

    Better error messages in test output.

  • testsuite/tests/typing-short-paths/short-paths.compilers.reference (modified):

    Better error messages in test output.

  • testsuite/tests/typing-sigsubst/test_locations.compilers.reference (modified):

    Better error messages in test output.

  • testsuite/tests/typing-unboxed/test.ml (modified):

    New test cases and better error messages in test output. This file contains a number of errors where primitives’ definitions and signatures are incompatible; I added 14 more test cases for cases that were already caught but now have more detailed error messages. (One of these test cases, Good16, tests a case where we do not raise a primitive-mismatch error). I also had to renumber the various BadN modules, which contributes to some noise in the diff.

  • testsuite/tests/typing-warnings/pr6587.ml (modified):

    Better error messages in test output.

  • toplevel/topdirs.ml (modified):

    This file raised Ctype.Unify with an empty trace to record issues when trying to install a printing function; I replaced this with a custom exception, Bad_printing_function. The original use of Ctype.Unify was understandable, as unification was in fact invoked; however, instead of conjuring empty unification traces, I caught and replaced the exceptions coming out of Ctype.unify.

  • typing/ctype.ml (modified):

    The biggest structural change to this file is that the exceptions Unify, Equality, and Moregen were each split into two pieces: Unify_trace, Equality_trace and Moregen_trace, which like the old exceptions contain raw traces (i.e., Errortrace.t) but are not exported; and Unify, Equality, and Moregen, which are exported and contain the new _error types from Errortrace (unification_error, equality_error, and moregen_error). This split is between “internal” and “external” errors: the _trace errors are used internally in unification, equality, and moregen, and the public-facing entry points rewrap these into the _error-based exceptions. The raise_for family of functions (raise_trace_for, raise_unexplained_for, occur_for, …) raise _trace exceptions now; these are caught and converted to the top-level exceptions in unify, unify_var, equal, and moregeneral. Within this file, no part of the implementation of unification, equality, or moregen ever catches the top-level Unify, Equality, and Moregen exceptions, with one exception: subst is implemented in terms of a forward reference to unify_var (now stored in a reference named unify_var' instead of unify'), and so it catches Unify. The other functions that have to be aware of raising Unify are the specialized unification functions filter_arrow and filter_method, which can raise Unify and the latter of which can rewrap a Unify_trace into Unify.

    When transforming an Equality_trace exception into an Equality exception, we also have to include the substitution; because this is built mutably, this involves saving the substitution reference before performing the equality comparison and dereferencing it on failure. This is most clearly done in equal, but is also done in other functions later in the file that invoke eqtype and catch Equality_trace.

    In addition to these changes, we apply the new _error types everywhere: the Subtype and Matches_failure exceptions use them instead of traces; the class_match_failure type contains them instead of traces; and because the class_match_failure type contains comparison_error in particular, we can also drop the class_match_failure_trace_type type entirely.

    There were also some functionality changes to some functions in this file: we generate more precise traces in moregen_row and eqtype_row. These functions matched on the presences of corresponding constructors in two polymorphic variants, and raised exceptions on failure; however, the exceptions were being caught and rewrapped in the wrong places. This only became visible now when we were printing out the traces, so we pushed the try … with … blocks that wrapped the trace with Variant (Incompatible_types_for l) inwards and used more specific errors in other cases, including the new Presence_not_guaranteed_for error. In moregen_row, we also had to roll back a link_type for better printing.

  • typing/ctype.mli (modified):

    Errors in this file now use the new error types from Errortrace instead of raw traces:

    • The Unify, Equality, and Moregen exceptions now contain the new whole-error types Errortrace.unification_error,Errortrace.equality_error, and Errortrace.moregen_error, respectively, instead of just traces.
    • Similarly, the Subtype and Matches_failure exceptions contain Errortrace.unification_error instead of unification traces.
    • The class_match_failure error type now contains Errortrace.equality_error, Errortrace.moregen_error, and Errortrace.comparison_error instead of error traces; the use of Errortrace.comparison_error also allows us to drop the class_match_failure_trace_type type entirely.
  • typing/errortrace.ml (modified):

    The changes here are the same as those to typing/errortrace.mli, which see: the additions of (1) new top-level error types and their attendant support; and (2) a new error case for equality and moregen. Because these are public-facing changes, I have documented them in typing/errortrace.mli.

  • typing/errortrace.mli (modified):

    There were two major changes in this file: the additions of (1) new top-level error types and their attendant support; and (2) a new error case for equality and moregen.

    For the first change, I added three new types, one for each kind of error that contains a trace (i.e., a 'variant Errortrace.t for some 'variant): unification_error, equality_error, and moregen_error. The traces from Maintain more structural information in type-checking errors #10170 are still the core of the errors; however, since they only have a 2-way GADT distinction, and more importantly since the type equality case requires extra information (see below), we bundle them into three “top-level” error types. The distinction is that 'variety Errortrace.t values are currently being either built or processed, whereas *_error values are whole, complete error messages.

    All three of these types contain a trace, as the record field trace; equality_error also contains a substitution, in order to report error messages with more type variable names that more accurately reflect the original source.

    To support these new error types, I also added comparison_error, which wraps both equality_error and moregen_error the way that the comparison t trace type used to; and I added swap_unification_error, which just lifts swap_trace to the new unification_error type.

    The second change is the addition of the Presence_not_guaranteed_for error case, which shows up when the presence variables of polymorphic variants disagree between the structure and the signature in an incompatible way; see ctype.ml for where it’s raised.

  • typing/includeclass.ml (modified):

    The printing code was updated to use the new equality_error and moregen_error types, including renaming local variables named trace to err.

  • typing/includecore.ml (modified):

    This file contains the bulk of the new text for the new error messages. This means new printers for primitive_mismatch, value_mismatch, private_variant_mismatch, and private_object_mismatch; updating printing text elsewhere; and calls to these new functions, particularly from report_type_mismatch (which merged with report_type_mismatch0). The error reporting functions were also updated to propagate the environment (Env.t) in from outside, rather than pulling it from the mismatch values.

    This file also contains updates to the “mismatch” types that record error reasons, which come in three varieties: first, the Env.ts were dropped, since the desired environment is propagated in from the printing functions and should not be duplicated here; second, the direct Errortrace.ts were replaced with Errortrace.moregen_error or Errortrace.equality_error, as appropriate; and third, the constructor Openness of private_variant_mismatch was renamed to Only_outer_closed to more accurately reflect its meaning. These changes also required updating later parts of the file to handle the new Ctype.Equality error and build these new mismatch values with just the equality_error rather than with the trace and the available environment.

  • typing/includecore.mli (modified):

    This file contains the interface-side versions of the above changes to typing/includecore.ml. First, the mismatch types were updated, as described above, to (1) remove Env.ts; (2) replace Errortrace.ts with either Errortrace.moregen_error or Errortrace.equality_error; and (3) rename the Openness constructor of private_variant_mismatch to Only_outer_closed. Second, the two exposed error-reporting functions, report_type_mismatch and report_extension_constructor_mismatch, gained an Env.t parameter. And third, we now expose report_value_mismatch as well.

  • typing/includemod.ml (modified):

    This file now propagates moregen traces raised when a value has the wrong signature. These errors are captured by the Value_descriptions error case (in the Error.core_sigitem_symptom type); this constructor now carries an Includecore.value_mismatch value, which itself contains an Errortrace.moregen_error or other appropriate error information. When created, this mismatch information is included in the constructor

  • typing/includemod.mli (modified):

    This file contains just the update to the Value_descriptions constructor from typing/includemode.ml (not the code to fill it); this constructor, which reflects disagreements between a value’s type and its type in the signature, now contains an explanation for the error, an Includecore.value_mismatch value.

  • typing/includemod_errorprinter.ml (modified):

    This file now prints out the details of the Includemod.Error.Value_descriptions error, which reflects a disagreement between a value’s type and the type for it in the signature, using the new function Includecore.report_value_mismatch. It also propagates the environment in from the outside, rather than requiring every error to have a duplicate copy.

  • typing/printtyp.ml (modified):

    I updated the name-printing machinery in this file by (1) wrapping it into a local module called Names, and (2) adding support for applying a substitution before looking up names. The first change allowed the mutable state to be encapsulated together, and required exposing a couple new functions to support existing direct queries to the mutable names list or similar; it also required updating the names of many function calls later in the file to refer to Names.foo instead of foo. The second change allowed for superior printing of equality errors, and is how we leverage the subst of equality_errors; before trying to get the name of a type, we first apply the substitution, which can produce a better name for the user. By applying these substitutions lazily rather than eagerly, we don’t overgenerate names and produce stray names such as 'a0 without a corresponding 'a.

    I also updated the printing code. I provided a new error message for the new Presence_not_guaranteed_for error message (see typing/errortrace.mli). I also gave the generic error and report_error functions a new subst parameter to support the substitutions coming out of equality, which uses the new Names.add_subst function. Finally, I updated the error-reporting functions (report_unification_error, report_equality_error, report_moregen_error, and Subtype.report_error to take the the new error types instead of traces (i.e., to take Errortrace.unification_error, Errortrace.equality_error, and Errortrace.moregen_error). (This is also where report_equality_error gets its substitution from; no other error-reporting functions provide substitutions.) I also added a new report_comparison_error function to print out the new Errortrace.comparison_error sum type.

  • typing/printtyp.mli (modified):

    The error-reporting functions (report_unification_error, report_equality_error, report_moregen_error, and Subtype.report_error) take the new error types instead of traces (i.e., to take Errortrace.unification_error, Errortrace.equality_error, and Errortrace.moregen_error). I also added report_comparison_error to print out the new Errortrace.comparison_error sum type.

  • typing/typeclass.ml (modified):

    This file’s errors now use Errortrace.unification_error instead of carrying around a trace (i.e., an Errortrace.unification Errortrace.t) directly. This also required refactoring the code in this file that used these errors to be aware of this. In particular, the code built these error explanations now uses the new Ctype.Unify (or Ctype.Subtype) error, which often just involved renaming a variable named trace (or tr) to err but not always.

  • typing/typeclass.mli (modified):

    This file’s errors now use Errortrace.unification_error instead of carrying around a trace (i.e., an Errortrace.unification Errortrace.t) directly.

  • typing/typecore.ml (modified):

    This file’s errors now use Errortrace.unification_error instead of carrying around a trace (i.e., an Errortrace.unification Errortrace.t) directly. This also required refactoring the code in this file that used these errors to be aware of this. In particular, the code built these error explanations now uses the new Ctype.Unify error, which often just involved renaming a variable named trace (or tr) to err but not always.

  • typing/typecore.mli (modified):

    This file’s errors now use Errortrace.unification_error instead of carrying around a trace (i.e., an Errortrace.unification Errortrace.t) directly.

  • typing/typedecl.ml (modified):

    This file’s errors now use Errortrace.unification_error instead of carrying around a trace (i.e., an Errortrace.unification Errortrace.t) directly. This also required refactoring the code in this file that used these errors to be aware of this. In particular, the code built these error explanations now uses the new Ctype.Unify error, which often just involved renaming a variable named trace (or tr) to err but not always.

    Additionally, some of the errors in this file now contain an Env.t, and the printing code in this file was also taught to propagate the environment more deeply. This supports the changes in Includecore that keep the environment coming in from this outer layer rather than maintaining duplicates.

    Finally, the local function suffix for generating the appropriate ordinal suffix for numbers – "st" for 1, 21, …; "nd" for 2, 22, …; "rd" for 3, 23, …; and "th" for everything else – was moved to utils/misc.ml and renamed ordinal_suffix so it could be used elsewhere.

  • typing/typedecl.mli (modified):

    This file’s errors now use Errortrace.unification_error instead of carrying around a trace (i.e., an Errortrace.unification Errortrace.t) directly. Some of them also now contain an Env.t for printing purposes that they did not before.

  • typing/typetexp.ml (modified):

    This file’s errors now use Errortrace.unification_error instead of carrying around a trace (i.e., an Errortrace.unification Errortrace.t) directly. This also required refactoring the code in this file that used these errors to be aware of this. In particular, the code built these error explanations now uses the new Ctype.Unify error, which often just involved renaming a variable named trace (or tr) to err but not always.

    Additionally, a call to Ctype.expand_head was formerly guarded by try … with …, but this function cannot throw, so the try … with … was removed.

  • typing/typetexp.mli (modified):

    This file’s errors now use Errortrace.unification_error instead of carrying around a trace (i.e., an Errortrace.unification Errortrace.t) directly.

  • utils/misc.ml (modified):

    Added the function ordinal_suffix for generating the appropriate ordinal suffix for numbers – "st" for 1, 21, …; "nd" for 2, 22, …; "rd" for 3, 23, …; and "th" for everything else. This function was originally a local function named suffix in typing/typedecl.ml.

  • utils/misc.mli (modified):

    Added the function ordinal_suffix for generating the appropriate ordinal suffix for numbers – "st" for 1, 21, …; "nd" for 2, 22, …; "rd" for 3, 23, …; and "th" for everything else. This function was originally a local function named suffix in typing/typedecl.ml.

@@ -557,6 +611,8 @@ Error: Signature mismatch:
val x : '_weak2 list ref
is not included in
val x : 'a list ref
The type 'weak2 list ref is not compatible with the type 'a list ref
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The detection of weakly polymorphic type seems to be failing here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks! There were a couple of issues with the detection of weakly polymorphic types: mostly the problem was that moregen (and match_class_types) weren't undoing some of the setup work they did in the error case, but we did also have to provide an argument controlling the printing of weak types for some other cases.

([> `App of
[ `Abs of string * 'a | `App of expr * expr ] * exp ]
as 'a)
| `App of expr * expr ]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At first glance, the printed type has changed. Do you have any comments on what is happening in this file?

Copy link
Contributor Author

@antalsz antalsz May 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes – the new type is actually more general, so this patch is improving this error. To wit, observe that what is changing is the second argument to the outer `App: it was

([ `Abs of string * expr | `App of 'a * exp ] as 'b)

where 'a referred to the whole type and 'b was unused. Now, it is instead

([> `App of [ `Abs of string * 'a | `App of expr * expr ] * exp ] as 'a)

where 'a is bound locally. Recall from earlier in the input that expr is

type expr =
  [ `Abs of string * expr
  | `App of expr * expr
  ]

Thus, rather than requiring exactly `Abs and `App, the new error message has a type that only requires `App, and can contain more constructors; moreover, this new type allows the first argument to this `App to be less constrained; rather than requiring it to be the entire type ('a), it only mandates that the input `Abs contain a string * 'a.

(I wanted to come up with a nice inclusion example you could paste here, but because the code doesn't compile, I couldn't quite figure out how to do so.)

toplevel/topdirs.ml Outdated Show resolved Hide resolved
typing/ctype.ml Outdated Show resolved Hide resolved
@gasche
Copy link
Member

gasche commented May 11, 2021

I had a couple drive-by comments from skimming the errortrace.mli changes, but nothing major:

  • It's slightly weird that the Errortrace module now defines errors (maybe it's about errors after all and not just error traces). If the responsibilities of the module are growing, we should eventually thing of naming it Type_error with a Trace submodule, but I don't think the change is warranted just yet so I'm fine with the current proposal.
  • Instead of three types foo_error, bar_error and foobar_error I wondered if it would make sense to have a GADT foo error, taking extra information in just one case. This makes it easy to define swap on all errors types, but on the other hand we don't need that.

typing/ctype.ml Outdated Show resolved Hide resolved
antalsz added a commit to antalsz/ocaml that referenced this pull request May 21, 2021
These test cases will also have improved error messages in the next
non-test commit.  They come from the work done to address reviewer
comments for ocaml#10407.
antalsz added a commit to antalsz/ocaml that referenced this pull request May 21, 2021
In addition to the smaller fixes, there were two major changes:

1. `Errortrace` has its type completely refactored, removing `desc`
   and exposing both `'variant trace` and `'variant error`.  The
   former is for traces that are being built up, and contains
   `type_expr`s; the lattern is for complete traces, and contains
   `expanded_type`s (a record containing two `type_expr`s).  This
   dramatically affected a number of call sites, but is much cleaner.

2. We now detect weakly polymorphic types much better during
   printing.  This involved fixing a bug in moregeneral, which was not
   restoring enough information in the error case; it also involved
   exposing the flag that differentiated between printing a type (no
   weakly polymorphic type detection) and a scheme (yes weakly
   polymorphic type detection) in more places, and giving it its own
   custom variant type, `Printtyp.type_or_scheme`.

Among the minor changes, the updates to `Includecore` to more
carefully detect privacy violation errors and differentiate between
the various kinds thereof (recorded in the `privacy_mismatch` type) is
the most visible in the code.
@antalsz
Copy link
Contributor Author

antalsz commented May 21, 2021

Thank you for the careful review, @Octachron! The small changes you suggested have all been taken care of, but your suggestions about handling trace expansion and your observation that weak types were not being properly detected required some more invasive changes.

The biggest change was to Errortrace, which had its types completely refactored. Previously, the central type in this module was 'variant Errortrace.t, the type of traces, which contained descs. A desc contained a type and, optionally, its expansion. However, actual expansion was only done at the end, after a trace containing Nones for all the expansions had been produced. This lead to unnecessary complexity in code that handled these optional types, and required being able to flatten them down. Instead, we now have two types:

  • 'variant Errortrace.trace, which contains types (type_exprs); and
  • 'variant Errortrace.error, which contains types and their expansions (Errortrace.expanded_types, a record containing two type_exprs).

(We also set up a similar split in Subtype.) These are both specializations of ('a, 'variant) Errortrace.t, which contains 'as. We then use this type to revamp the errors:

  • Ctype’s internal exceptions, {Unify,Equality,Moregen}_trace, now contain _ traces.
  • Errortrace’s error types, {unify,equality,moregen}_error, now contain _ errors.

By keeping a distinction between traces and errors, we get some benefits:

  1. We can replace the old flatten code with simply Errortrace.map, and need it less.
  2. We can use the types to separate the notion of “partial trace being built up” and “complete error trace”.
  3. We can ensure that we never forget to perform expansion (indeed, we weren’t doing it in enough places previously), improving the error messages; we can explicitly decide not to expand, as is sometimes necessary, but we can never do so by accident.

The other major change was to our handling of printing weakly polymorphic types. In one place, we fixed a bug – two functions that were part of the moregen check were instantiating variables at generic_level - 1 that were not getting regeneralized in the error case. Besides that, we also had to expose the distinction between printing types (and not detecting weakly polymorphic types during printing) and printing schemes (and detecting weakly polymorphic types during printing), as the new error trace printing could reveal that distinction. This was previously controlled by a boolean argument (formerly called sch); we changed this to a variant, Printtyp.type_or_scheme, and propagated it further throughout the printing code (calling it mode). This change was invasive, but not particularly deep.

As a more minor change, we now detect the different kinds of privacy-exposing violations, and print bespoke error messages (was it a private record constructor that was revealed, or a private type abbreviation, or…). And of course, I addressed all of the other smaller review comments.

Finally, one last note: I updated testsuite/tests/typing-misc/deep.ml to replace ref with option, and rebased this change back into the very first commit. This is because these example are intended to be simple, and avoid any use of weak polymorphism even by accident; I call this out here because it is the only change to an existing commit.

Detailed, file-by-file changes

Since some of these changes touched a lot of code, I felt it behooved me to write up the file-by-file changes again. However, I won’t comment on the specifics of any of the test files unless we added new tests to them (in a new commit, f341e13, that has been rebased into the past, between the old “new tests” commit and the first content commit) or something else significant happened; they’re all improvements.

  • .depend (modified):

    Inessential changes, autogenerated.

  • Changes (modified):

    @Octachron, I added you as a reviewer.

  • testsuite/tests/typing-misc/deep.ml (modified):

    This was rebased all the way in the first commit, to use option instead of ref; these examples are intended to be simple, and avoid any use of weak polymorphism even by accident.

  • testsuite/tests/typing-gadts/return_type.ml (new):

    New tests of what goes wrong if we don’t give GADT constructors return types that are syntactically identical to the expected types. If we do too much expansion when printing error messages, this can produce inferior or nonsensical errors.

  • testsuite/tests/typing-modules/extension_constructors_errors_test.ml (modified):

    A new test, exposing multiple private variant constructors at once, to validate the grammar of the resulting error message.

  • testsuite/tests/typing-modules/inclusion_errors.ml (modified):

    One new test ensuring that variable unification happens correctly, and several new tests for various kinds of privacy violations.

  • testsuite/tests/typing-objects/errors.ml (modified):

    A new test of what goes wrong when we fail to conform to the expected class type and have a polymorphic variable; this can go wrong if we do not handle weakly polymorphic variables correctly.

  • toplevel/topdirs.ml (modified):

    Deleted some review comments.

  • typing/ctype.ml (modified):

    I updated the {Unify,Equality,Moregen}_trace exceptions to use the new trace type, the Subtype exception to use Subtype.error, and Escape to use type_expr escape (so it is pre-expansion, not post-expansion). Relatedly, I exposed some new trace-expansion machinery, particularly for creating Diffs of expanded_types, and performed expansion in more places for better error messages. There was also some code churn from removing or adjusting some of the convenience functions in Errortrace for this new reality (e.g., the removal of Errortrace.diff). The matches function now exposes an argument controlling whether it performs expansion or just duplicates the input, as it is called in a place where expansion produces worse error messages.

    I also fixed a bug in the moregeneral checks where it was not correctly regeneralizing variables in the error case (breaking the detection of weakly polymorphic types), and moved generalize_class_type here from Typeclass.

  • typing/ctype.mli (modified):

    Expansion-related updates: I updated the Subtype exception to use Subtype.error, and I updated Escape to use type_expr escape (so it is pre-expansion, not post-expansion). Relatedly, I expose expanded_diff and unexpanded_diff, for creating Errortrace.Diffs of Errortrace.expanded_types in other modules; and I provide matches with an argument controlling whether it performs expansion or just duplicates the input, as it is called in a place where expansion produces worse error messages.

    I also expose generalize_class_type from here after moving it from Typeclass.

  • typing/errortrace.ml (modified):

    This file contains the core of the updates for expansion-aware error traces: replacing desc with expanded_type, splitting t into trace and error, and removing the old desc-based machinery like short, flatten, and diff. The changes here are smaller than might be expected, as most of the difference is at use sites.

  • typing/errortrace.mli (modified):

    Most of the changes to errortrace.ml are visible here, as the change to expansion-aware error traces is very user-visible.

  • typing/includeclass.ml (modified):

    Propagate the new weak type detection argument through the error printing; these errors are the reason this is a parameter, instead of varying with the variety of trace we’re dealing with.

  • typing/includeclass.mli (modified):

    The interface side of typing/includeclass.ml – expose the new weak type detection argument to report_error.

  • typing/includecore.ml (modified):

    This module is augmented with better detection for exposed private things, in that it now detects what sort of private thing was exposed (in the new privacy_mismatch type) and reports it appropriately. It also now specifies that the calls to Printtyp.report_{equality,moregen}_error are printing type schemes, to get the superior detection of weakly polymorphic type variables.

  • typing/includecore.mli (modified):

    We now expose the new privacy_mismatch type mentioned above.

  • typing/includemod_errorprinter.ml (modified):

    This file now has to specify how the class inclusion errors are to be printed; it specifies they are both to be printed as type schemes, triggering the weak type detection.

  • typing/printtyp.ml (modified):

    This file was hit by both major updates.

    Firstly, its operations on expanded types had to change from operating on pairs of types to operating on Errortrace.expanded_types. This mostly meant updates to pattern matching and/or variable names, or similar such things.

    Secondly, it was the core of the updates for better detection of weakly polymorphic variables. The changes are essentially about introducing the new type_or_scheme variant, and plumbing it through as mode instead of the boolean sch (or changing constant booleans to the constructors of this new type); no behavior was changed during printing. The only change was that the ability to provide a type_or_scheme was exposed more broadly.

    (On a more minor note, we also updated the type of filter_trace to line up the trace_format and the trace it took, for better type checking.)

  • typing/printtyp.mli (modified):

    This file exposes the new type_or_scheme variant for controlling if types are printed without or with detection of weakly polymorphic variables (i.e., if they are printed as types or as type schemes). The function tree_of_typexp, which formerly took a bool, now takes a type_or_scheme; we also provide this as an extra argument to type_expansion and report_{equality,moregen,comparison}_error. (Unification never needs to think about weakly polymorphic variables, so report_unification_error doesn’t take a new argument, and nor does Subtype.report_error.)

    This file also uses the new Errortrace.expanded_type type, instead of pairs of two type_exprs.

  • typing/typeclass.ml (modified):

    I moved generalize_class_type to Ctype, and changed the formerly-boolean arguments to Printtyp.tree_of_typexp to elements of the new Printtyp.type_or_scheme variant.

  • typing/typecore.ml (modified):

    This file now uses the new types from Errortrace: Subtype.error instead of Subtype.t, and expanded_type instead of pairs of type_exprs. This file also explicitly constructs traces, and so had to expand them, carefully choosing the expansion behavior when doing so.

  • typing/typecore.mli (modified):

    This file now uses the new types from Errortrace: Subtype.error instead of Subtype.t, and expanded_type instead of pairs of type_exprs.

  • typing/typedecl.ml (modified):

    This file has to carefully avoid expansion when constructing traces or when calling Ctype.matches, as the expansion will otherwise take us past constraints and produce nonsensical error messages. We also update the first argument in the various calls to Printtyp.tree_of_typexp from false to the new Type constructor of Printtyp.type_or_scheme.

  • typing/typetexp.ml (modified):

    I changed the formerly-boolean arguments to Printtyp.tree_of_typexp to elements of the new Printtyp.type_or_scheme variant.

antalsz added a commit to antalsz/ocaml that referenced this pull request May 21, 2021
These test cases will also have improved error messages in the next
non-test commit.  They come from the work done to address reviewer
comments for ocaml#10407.
antalsz added a commit to antalsz/ocaml that referenced this pull request May 21, 2021
In addition to the smaller fixes, there were two major changes:

1. `Errortrace` has its type completely refactored, removing `desc`
   and exposing both `'variant trace` and `'variant error`.  The
   former is for traces that are being built up, and contains
   `type_expr`s; the lattern is for complete traces, and contains
   `expanded_type`s (a record containing two `type_expr`s).  This
   dramatically affected a number of call sites, but is much cleaner.

2. We now detect weakly polymorphic types much better during
   printing.  This involved fixing a bug in moregeneral, which was not
   restoring enough information in the error case; it also involved
   exposing the flag that differentiated between printing a type (no
   weakly polymorphic type detection) and a scheme (yes weakly
   polymorphic type detection) in more places, and giving it its own
   custom variant type, `Printtyp.type_or_scheme`.

Among the minor changes, the updates to `Includecore` to more
carefully detect privacy violation errors and differentiate between
the various kinds thereof (recorded in the `privacy_mismatch` type) is
the most visible in the code.
Copy link
Member

@Octachron Octachron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a handful of remarks and I still need to reread the PR in details, but overall the global structure seems good.

class c = object method x = 3 method y = true end

let o = new c
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this test not redundant?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit redundant, but it's a regression test for #10399, so I want to include it.

testsuite/tests/typing-unboxed/test.ml Outdated Show resolved Hide resolved
@@ -169,6 +169,8 @@ let _ = add_directive "mod_use" (Directive_string (dir_mod_use std_out))

(* Install, remove a printer *)

exception Bad_printing_function
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that specializing this exception is probably a good idea (Self todo: check that this is not an issue in utop).

@@ -1467,10 +1489,10 @@ let instance_label fixed lbl =

(**** Instantiation with parameter substitution ****)

let unify' = (* Forward declaration *)
(* NB: since this is [unify_var], it raises [Unify], not [Unify_trace] *)
let unify_var' = (* Forward declaration *)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review note: this aligns the forward declaration name with the function name.

typing/printtyp.mli Outdated Show resolved Hide resolved
typing/typetexp.ml Show resolved Hide resolved
typing/printtyp.ml Show resolved Hide resolved
< m : 'b. 'b * ('b * < m : 'c. 'c * 'e > as 'e) >
The method m has type 'a. 'a * ('a * < m : 'a. 'b >) as 'b,
but the expected method type was 'c. 'c * ('b * < m : 'c. 'a >) as 'a
The universal variable 'b would escape its scope
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name of the universal variable does not seem compatible with the previous part of the error message.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is true, but is deeply tied into some questions about when we reset type names while printing which are not local changes. The fix involves getting things right across multiple lines of the error trace, and will likely involve making very invasive changes to all the tree_of_* code. Even without that, it requires generating some information up front for the whole trace, and only filling it in later. I think the best conclusion is that (1) there's a genuine bug here, but (2) this PR is not the place to fix it -- I'll start work on a PR to deal with this right after I'm done with this one.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I agree that starting with an issue referencing the bug is good enough for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just submitted PR #10488, which should fix this error.

antalsz added a commit to antalsz/ocaml that referenced this pull request Jun 4, 2021
These test cases will also have improved error messages in the next
non-test commit.  They come from the work done to address reviewer
comments for ocaml#10407.
antalsz added a commit to antalsz/ocaml that referenced this pull request Jun 4, 2021
In addition to the smaller fixes, there were two major changes:

1. `Errortrace` has its type completely refactored, removing `desc`
   and exposing both `'variant trace` and `'variant error`.  The
   former is for traces that are being built up, and contains
   `type_expr`s; the lattern is for complete traces, and contains
   `expanded_type`s (a record containing two `type_expr`s).  This
   dramatically affected a number of call sites, but is much cleaner.

2. We now detect weakly polymorphic types much better during
   printing.  This involved fixing a bug in moregeneral, which was not
   restoring enough information in the error case; it also involved
   exposing the flag that differentiated between printing a type (no
   weakly polymorphic type detection) and a scheme (yes weakly
   polymorphic type detection) in more places, and giving it its own
   custom variant type, `Printtyp.type_or_scheme`.

Among the minor changes, the updates to `Includecore` to more
carefully detect privacy violation errors and differentiate between
the various kinds thereof (recorded in the `privacy_mismatch` type) is
the most visible in the code.
antalsz added a commit to antalsz/ocaml that referenced this pull request Jun 4, 2021
antalsz added a commit to antalsz/ocaml that referenced this pull request Jun 4, 2021
These test cases will also have improved error messages in the next
non-test commit.  They come from the work done to address reviewer
comments for ocaml#10407.
antalsz added a commit to antalsz/ocaml that referenced this pull request Jun 18, 2021
@Octachron
Copy link
Member

The last commit looks fine.
I will have a last glance after this week-end, then I will merge on Monday.

Changes Outdated Show resolved Hide resolved
antalsz added a commit to antalsz/ocaml that referenced this pull request Jun 21, 2021
In addition to the smaller fixes, there were two major changes:

1. `Errortrace` has its type completely refactored, removing `desc`
   and exposing both `'variant trace` and `'variant error`.  The
   former is for traces that are being built up, and contains
   `type_expr`s; the lattern is for complete traces, and contains
   `expanded_type`s (a record containing two `type_expr`s).  This
   dramatically affected a number of call sites, but is much cleaner.

2. We now detect weakly polymorphic types much better during
   printing.  This involved fixing a bug in moregeneral, which was not
   restoring enough information in the error case; it also involved
   exposing the flag that differentiated between printing a type (no
   weakly polymorphic type detection) and a scheme (yes weakly
   polymorphic type detection) in more places, and giving it its own
   custom variant type, `Printtyp.type_or_scheme`.

Among the minor changes, the updates to `Includecore` to more
carefully detect privacy violation errors and differentiate between
the various kinds thereof (recorded in the `privacy_mismatch` type) is
the most visible in the code.
antalsz added a commit to antalsz/ocaml that referenced this pull request Jun 21, 2021
antalsz added a commit to antalsz/ocaml that referenced this pull request Jun 21, 2021
`equal_private` should only be used when checking inclusion for
private *type abbreviations*, but was being used incorrectly for
private data types and private row types as well.
These test cases will have improved error messages in the next
non-test commit.
These test cases will also have improved error messages in the next
non-test commit.  They come from the work done to address reviewer
comments for ocaml#10407.
These test cases will also have improved error messages in the next
non-test commit.  They come from the work done to address reviewer
comments for ocaml#10407.
We now produce more detailed error messages during various kinds of
module inclusion, taking advantage of the new structured error trace
generation from ocaml#10170.  Previously, these errors were "shallow",
ending as soon as there was an incompatibility; this patch makes them
"deep", reporting the *reasons* for those problems.  For example,
consider the following module:

    module M : sig
      val x : bool * int
    end = struct
      let x = false , "not an int"
    end

This now produces the following error:

    Error: Signature mismatch:
           Modules do not match:
             sig val x : bool * string end
           is not included in
             sig val x : bool * int end
           Values do not match:
             val x : bool * string
           is not included in
             val x : bool * int
           The type bool * string is not compatible with the type bool * int
           Type string is not compatible with type int

The last two lines are new in this patch.  Previously, the error
message stopped two lines earlier, omitting the key detail that the
reason there is an error is specifically that `string` is not equal to
`int`.
In addition to the smaller fixes, there were two major changes:

1. `Errortrace` has its type completely refactored, removing `desc`
   and exposing both `'variant trace` and `'variant error`.  The
   former is for traces that are being built up, and contains
   `type_expr`s; the lattern is for complete traces, and contains
   `expanded_type`s (a record containing two `type_expr`s).  This
   dramatically affected a number of call sites, but is much cleaner.

2. We now detect weakly polymorphic types much better during
   printing.  This involved fixing a bug in moregeneral, which was not
   restoring enough information in the error case; it also involved
   exposing the flag that differentiated between printing a type (no
   weakly polymorphic type detection) and a scheme (yes weakly
   polymorphic type detection) in more places, and giving it its own
   custom variant type, `Printtyp.type_or_scheme`.

Among the minor changes, the updates to `Includecore` to more
carefully detect privacy violation errors and differentiate between
the various kinds thereof (recorded in the `privacy_mismatch` type) is
the most visible in the code.
This was done by making their constructors private, and introduce
smart constructors that raise a fatal error if passed an empty trace.
This change was made for `Errortrace.unification_error`,
`Errortrace.equality_error`, `Errortrace.moregen_error`, and the new
type `Errortrace.Subtype.error` (which now contains a (possibly-empty)
unification trace as well).

As a side effect, in order to ensure that all raised unification
errors were indeed nonempty, I had to modify `Ctype.filter_arrow`,
`Ctype.filter_method`, and `Ctype.filter_self_method` to raise bespoke
errors rather than empty unification traces.  This also allowed me to
change the error messages printed in those cases to be more precise.
@antalsz
Copy link
Contributor Author

antalsz commented Jun 21, 2021

I've fixed Changes and rebased this onto trunk.

@Octachron Octachron merged commit 32d25e7 into ocaml:trunk Jun 22, 2021
@Octachron
Copy link
Member

Merged, thanks for the hard work!

@gasche
Copy link
Member

gasche commented Jun 22, 2021

Congratulations @antalsz and @Octachron for this hard work indeed.

@antalsz
Copy link
Contributor Author

antalsz commented Jun 22, 2021

Thank you for the shepherding and review, @Octachron!

@avsm
Copy link
Member

avsm commented Jun 22, 2021

This would be a rather wonderful change to have in 4.13, if it's not too late to cherrypick...

@Octachron
Copy link
Member

I do regret not reviewing this change in time for 4.13 .

Nevertheless, the change is quite extensive; and it might possibly raise some naked exceptions on some unknown pathological type errors for classes without the #8516 PR, which is not-yet merged.

@lpw25
Copy link
Contributor

lpw25 commented Jun 23, 2021

it might possibly raise some naked exceptions on some unknown pathological type errors for classes without the #8516 PR

I'm pretty sure it can't raise such exceptions -- or at least that it doesn't change things here. The filter_self_method used to raise Unify and there aren't any Unify handlers around the calls that you are worried about.

stedolan pushed a commit to stedolan/ocaml that referenced this pull request Mar 21, 2023
5bf2820278 Merge OCaml 4.14 (#55)
34432bedff Set VERSION to 4.14.0+jst
4e1d21c0cb Re-enable probes (amd64 only, as yet untested)
70840805f7 Regenerate .depend for upstream build system
16cb75b6c2 Fix upstream build system after merge (+Bootstrap)
b635e3c4f9 Enable debug runtime in CI
5029967055 Apply ocaml-flambda/flambda-backend#916
7640f4bcd5 Ensure that tail recursion modulo cons is not used with local allocations
d3b6161b03 Resolve merge conflicts in asmcomp/i386
09ac6e11cc Testsuite fix for Fortran tests
9f04dc41da Avoid having scope side-effects in loosen_ret_modes
c32a0b754e Bugfix for error messages in Includecore (see records_errors_test.ml)
ec525635eb Resolve merge conflicts in testsuite
48e13dabb7 Resolve merge conflicts in tools, debugger, toplevel, etc.
942760fbb6 Bugfix: take an instance before typing Pexp_constraint
4ede4874f6 Resolve merge conflicts in stdlib/ runtime/
df43e0282a Resolve merge conflicts in middle_end/ driver/ asmcomp/ (amd64 only)
b7b12b25a9 Resolve merge conflicts in bytecomp/ driver/ so that ocamlc builds
2fa00c13d3 Resolve merge conflicts in lambda/
627d504f22 Resolve merge conflicts in typing/
2bf19bf270 Resolve conflicts in parsing/ & utils/, and regenerate the parser.
05e2ed4cdd Add [@tail hint] annotation to select default behaviour explicitly (#43)
159d8df6d7 Merge remote-tracking branch 'ocaml/4.14' into ocaml-jst
56818c4c9b jst.dune build fix (after flambda-backend merge)
567b95591a Merge flambda-backend changes
409bdce6c6 Support building with dune (#49)
839c1ccdd8 Merge flambda-backend changes
ab34788a5c Merge flambda-backend changes
baf31dfd04 New uniform treatment for misplaced attribute warnings (#44)
679b5001e3 This test requires systhreads to be available
ba9c5ea7b1 Add ability to bootstrap flexdll on Jenkins CI (#11567)
a73ef7a49c Merge pull request #11556 from FardaleM/doc_typo
adcf2cb2c6 Fix [@deprecated_mutable], which couldn't be triggered. (#11524)
040f05bdf0 Fixup Changes
7bfcdc30b6 Merge pull request #11487 from purplearmadillo77/fma_test
9fac589c2f More prudent deallocation of alternate signal stack (#11496)
5d5c5b61b6 Merge pull request #11468 from dra27/i686-mingw-ipv6
7c16b4b0d9 Merge pull request #11373 from dra27/flexlink-detect
a691ba7f78 Do not elide the whole module type error message (#11416)
ec8dea9a81 Merge pull request #11417 from lpw25/fix-virtual-class-type-constrs
b2c7990ac8 tests/lib-bigarray-2/has-gfortran.sh: don't print anything on stdout
757e0a718a Stop calling ranlib on created / installed libraries (#11184)
9acf32acf8 Document limitation on `caml_callbackN` (#11409)
397925772e Merge pull request #11396 from gasche/fix11392
888e84365c Merge pull request #11397 from Octachron/tast_mapper_fix_for_with_modtype
d2689fced7 Refactor the initialization of bytecode threading (#11378)
ed346d06d5 Merge pull request #11380 from damiendoligez/fix-fortran-test-on-macos
0731e8c81f Better documentation for [string_of_float]. (#11353)
2c2e99049a Merge pull request #11267 from dra27/more-_MSC_VER
ef960fb5f9 Guard more instances of undefined _MSC_VER
b6602b11f7 Changes
70c5a7d3df misc.h: fix preprocessor conditional on _MSC_VER
98fedc5cd2 Merge pull request #11236 from Nymphium/missing-since2
66b63e2f24 Do not trigger warning when calling virtual methods introduced by constraining "self" (#11204)
bfb4b1e608 increment version number after tagging 4.14.0
15553b7717 release 4.14.0
54c6b3fee4 last commit before tagging 4.14.0
80b20ed92c Changes: split highlights
fea7946d27 Merge pull request #11133 from Octachron/warning-man-414
4df514973d `odoc`ify the parsetree comments (#11107)
8311a408b1 Fix bigarray 32bit integer overflow of offset in C imp. (#11118)
cfee1a6f61 increment version number after tagging 4.14.0~rc2
466023cefb release 4.14.0~rc2
ab5e660a9b last commit before tagging 4.14.0~rc2
766b6283ef Fix #11101 by making `occur ty ty` succeed (#11109)
db17a8ecd5 increment version number after tagging 4.14.0~rc1
93c2a7f104 release 4.14.0~rc1
679a9504fe last commit before tagging 4.14.0~rc1
5af2478516 Merge pull request #10740 from gasche/tmc-manual-pr
25478af4e4 Do not pass `-no-pie` to the C compiler on musl/arm64 part 2 (#11036)
56c9302e8e Merge pull request #11031 from fabbing/fp_exn_handler
849218e01b Merge pull request #10850 from dra27/flexdll-0.40
a6369a2e8a Merge branch '4.14' into fp_exn_handler
31ca227f92 With frame-pointers entertrap restores base pointer
ddf99786f8 riscv: Generate frametable in data section to improve code relocatability (#11042)
dee5315ad1 increment version number after tagging 4.14.0~beta1
87abd773d5 release 4.14.0~beta1
2ca77b9c33 last commit before tagging 4.14.0~beta1
cc7de730d4 Merge pull request #10900 from kostikbel/printf
b53c79e59b update Change for #10397
cc606b8cf7 Merge pull request #10835 from hannesm/fix-32bit-relocations
113d1e5b68 Merge pull request #10914 from sanette/search
b9ad032486 Merge pull request #10815 from Julow/odoc-200-fixes
716c17c08d Merge pull request #10397 from mjambon/unsupported-on-windows
433f3f5548 Merge pull request #10794 from wiktorkuchta/warn-57
d480c0c4df Merge pull request #10719 from stedolan/arityfix
99dadf22cc Merge pull request #10828 from madroach/aarch64_openbsd
85039e70ad Env: clear uid_to_loc (#11012)
c8c51a735d Merge pull request #11000 from gasche/translattribute-fix
6aa8b021be Merge pull request #10998 from thierry-martinez/fix.doc.seq_fold_lefti
ea7af37703 fix a minor regression from #10462
f9b3a4edc5 increment version number after tagging 4.14.0~alpha2
e1bcd25f9a release 4.14.0~alpha2
aafa87e87d last commit before tagging 4.14.0~alpha2
0c16ba6740 #10836: recognize unrecoverable errors in the signature inclusion check (#10952)
4d3c53688f Merge pull request #10959 from COCTI/fix10907
35158b280e add reviewer and remove comment closing
b5973cd266 add PR number, start CI
1eb55f575a Enable native code on aarch64-*-openbsd*
98453445b4 In_channel.input_all: fix bug (#10978)
5cc897c5be Merge pull request #10968 from nrolland/patch-1
4a3f29d57a Recommend using quoted string literals for regexes (#10946)
fe1b2183c2 Fix #10907: Wrong type inferred from existential types
ae1a31b019 Merge pull request #10839 from Et7f3/fix_show_regression
3ff3fcc0c7 Introduce the Thread.Exit exception (#10951)
db915bd895 Do not put deprecation warnings on int8, uint8, int16, uint16 (#10937)
15a457bde5 Document exception raised by read_line (#10948)
b2fe7590f3 Merge pull request #10846 from voodoos/objinfo-optional-shape
00ab75652e Merge pull request #10932 from wiktorkuchta/empty-anchors-css
683d80e264 increment version number after tagging 4.14.0~alpha1
7c420e8375 release 4.14.0~alpha1
f4b50329cc last commit before tagging 4.14.0~alpha1
fd39912851 [4.14] Add deprecation warnings on {Int32,Int64,Nativeint}.format (#10922)
7705e92064 Merge pull request #10825 from gasche/shape-strong-call-by-need
36f04706eb Shape.decompose_abs
1dbedf0052 shape: never erase unknown variables into anonymous leaves
9f9017fed3 Changes
6080fbf901 shape: a remark on memoization with non-canonical data structures
d9c5dc87a0 replace the wrapped lazy thunks by pre-memoization inputs
c1ff336cdc typing/shape.ml: memoized, strong call-by-need
5c1f723715 [minor] shape: refactor the printing of shape items
3b7dbe2c31 use an environment instead of repeated substitutions
7038d473ff Shape: nicer handling of fuel
d406f47470 reduce the shapes after type-checking
4f980723bf shape: disable all reductions
8b7d2a04d5 shapes: more sharing in includemod
fff88af334 shape: only refresh vars when necessary
445db99496 Free the alternate signal stack if sigaltstack fails (#10891)
71fd0fbfc4 change manual to include a subsection about 'let exception' (#10848)
29b933a831 add @since on Atomic (#10841)
5798e801e1 fix #show regression in 4.14
b6163a49ee Fix a crash in `Obj.reachable_words` (#10853)
0b6f4b390d Fix more display differences between ocamlnat/ocaml (#10849)
61eeefec00 Merge pull request #10712 from NathanReb/fix-type-var-naming
08eac16563 Merge pull request #10797 from dra27/fix-volatile
2a6df5eb69 Fix #10822: Bad interaction between ambivalent types and subtyping coercions (#10823)
0fdbf79351 Ensure right-to-left evaluation of arguments in cmm_helpers (#10732)
18944505af Merge pull request #10589 from wiktorkuchta/manual-spaces
150874b85c Merge pull request #10820 from Octachron/fix-10781
451cb76c0d Merge pull request #10813 from wiktorkuchta/manual-numbers
c764a35f2e Merge pull request #10726 from xavierleroy/free-alt-sig-stack
3370799429 Merge pull request #10575 from Octachron/dump-dir
9886564f47 Merge pull request #10806 from gasche/ocamlopt-dshape
76040803f6 Merge pull request #10799 from Octachron/yet_another_missing_cmi_error
49e28143a4 Revert "Merge pull request #10736 from xavierleroy/bigger-stack"
b0fb4ab86b Merge pull request #10739 from shindere/fix-install
17275714a6 Merge pull request #10764 from alainfrisch/afrisch_fix_oo_compil
0f152a868f Merge pull request #10783 from MisterDA/unix-create-process-doc-use-unix-stdout-instead-of-stdlib-stdout
3f170f317e Merge pull request #10771 from Octachron/abstract_row_repr_bug
9c247a8c9a change entry for #9444
ae1f37cf76 Merge pull request #9444 from let-def/printtyped-extra
3a2a1415dc Add [@poll error] attribute (#10462)
2a11a0a98c Merge pull request #10718 from voodoos/shapes
e8d560740b Merge pull request #10736 from xavierleroy/bigger-stack
cd2089784d first commit on branch 4.14
5000b93cad last commit before branching 4.14
11cdd82e6f Fix white spaces in Changes
f310f749bd Update magic numbers for 4.14
096ab9cdd3 Some more documentation on C compilers in file INSTALL
db47011e45 More detailed recommendations about C compilers in INSTALL file (#10685)
d0e6520f38 Merge pull request #10642 from MisterDA/win32unix-posix-Sys.remove-Unix.unlink
c5f4866038 Merge branch 'trunk' into win32unix-posix-Sys.remove-Unix.unlink
ed7876a8bf Merge pull request #10752 from wiktorkuchta/common.ml.in-open
e23ec809c3 new ephemeron API, implemented on top of old ephemerons (#10737)
8170460a0d Merge pull request #10751 from stedolan/add-ocamlnat-dlambda
284af7de6e Fix compile error due to unused open
ac1aabd3f7 Add -dlambda to ocamlnat options
718e646cc0 Merge pull request #10746 from Octachron/more_lax_nesting_rule_for_camltex
8d1990b499 caml-tex: allow to nest warnings and errors within an example
2bcef4bc17 Merge pull request #9760 from gasche/new-trmc
35b86df0ae Additions to the module Seq (#10583)
0891d8e819 bow to check-typo
0d80ae3dac [minor] complete the renaming of 'TRMC' into 'TMC'
a862307634 [review] move the main TMC comment to tmc.mli
4a338a825f [review] improve code readability within TMC disambiguation
1b10dd9aef TMC: much thinking about which @tailcall annotations to preserve where
e6fbcc8857 [WIP] TMC: Changes
d2a2dc9a26 [review]: in TMC ambiguity errors, print the ambiguous callsites
955528b22a [review] copyright headers and .mli file
2dcd81886a TMC: do not warn on ambiguous sub-terms of non-ambiguous programs
9725d90cd7 TMC testsuite: ambiguities with many arguments
67251d9295 [review] new TMC test
333806b419 TMC: implement [@tail_mod_cons] for non-recursive lets
9306f658ae [review] TMC: make 'offset' distinct from 'lambda' for clarity
d92ef9898b [review] tmc: use a placeholder value that is better for debugging
9c9952012a [review] interface for Tmc.Constr
7c17ea641e [review] TMC: rename 'return' to 'lambda'
f881fc435a [review] rename 'con' into 'constr'
9242408e05 TMC: support Tupled functions and partial applications
1daea333b6 [refactoring] move Simplif.exact_application to Lambda
41b9afcf1c TMC: some semantic preservation tests
640f24643d TMC: testsuite
1b8771ed6b TMC: warn when a tail-call is broken by the TMC transformation.
0e04aa1b29 TMC: warn if there is no optimization opportunity
7dc0d86d78 TMC: error if several different calls could be optimized
10d756bccf TMC: Constructor composition in direct style: [benefits_from_dps : bool].
e30d162ea8 TMC: [minor] improve dummy name generation for let-bound arguments
4d2d0b0dfa TMC: optimize constructor composition
e9397f6605 TMC: generalize `Choice.t` to use binding operators
90dd724a3e TMC: code-generation tests
e0df0a1517 TMC: product representation of choices
35dff8cacf preliminary implementation of TMC (tail modulo cons)
a84b25b222 prepare for TMC (tail modulo cons) transformation
443be9c2af Buffer: reimplement UTF encoders with the new UTF Bytes encoders. (#10733)
6116cd5798 Fix #10735 as suggested by @lpw25 (#10738)
2d91196a66 Update Changes
7274e23659 Merge pull request #10743 from dra27/be-quiet
d44caf421b Don't display prune information for .gitignore
996dc40113 Merge pull request #10697 from MisterDA/win32unix-WSADuplicateSocket-or-DuplicateHandle
cab43ad3b6 Merge pull request #10715 from dra27/ocamlnat-hooks
d0129e2914 Fix Changes entry for 10717.
d9cfda1e1a Windows: Sys.remove, Unix.unlink now remove symlinks to directories
78e59967d8 Test Sys.remove, Unix.unlink behavior on symlinks and directories
d1d4352a1b Merge win32unix/dup2.c into win32unix/dup.c and factor code
2ecf1ecb20 win32unix: use WSADuplicateSocket in bindings of dup and dup2
7997b65fdc Merge pull request #10710 from dbuenzli/utf-support
910849911b Update changes file.
1df0d3bbee String: add UTF decoders and validations.
230f9c60f9 Bytes: add UTF codecs and validations.
b71489f03e Ensure that functions are evaluated after their arguments (#10728)
d564b171ad Eliminate Topeval.phrase_name entirely
18c4d16b3b Fix performance bug in Obj.reachable_words (#10731)
1067f77656 Merge pull request #10714 from dra27/x86-assembler-hook
60de0907c8 Add X86_proc.with_internal_assembler
4c52549642 Merge pull request #10722 from Octachron/fix_unused_functor_warning
5a80188d5b Merge pull request #10720 from dra27/autoconf-tweak
fe9b014c95 fix the marking of unused values in module type definitions
5915a72545 Fix typos in Changes
0e50ef1029 Merge pull request #10717 from shindere/simplify-man-pages-installation
2250fd8a22 abstract row_field (#10627)
577ccbf11d Fix AC_CONFIG_HEADERS on CRLF-checkouts
304abe94c2 Uchar: add UTF codec tools.
0684867f70 Merge pull request #10672 from wiktorkuchta/webman-disc
54e10a5c7a Merge pull request #10527 from wiktorkuchta/toploop
f8dc1ef370 Merge pull request #10681 from lthls/boolean-lifthenelse
9587b17a97 Merge pull request #10713 from Octachron/babylonian_manual
05faf05a10 Changes
a58ec8866f Add comment on Simplif.split_default_wrapper's pattern matching
848304c9dd Review: Document Switch.Make parameters
ff41359014 Enable if-then-else elimination in Cmmgen
37298b0b9f Enforce boolean Lifthenelse in native mode
5a44941190 Mention the help directive on toplevel startup
bf0859daec webman: Use li::marker for coloring bullets
cd418bfcbd Use babel to allow underscore in labels
e2c2611f53 Simplify the installation of man pages
7fb10211f6 Merge pull request #10541 from COCTI/abstract_fk_and_commu
89e4e1eca0 dune: disable some warnings
cc9ae80bb1 Wrong unmarshaling of function pointers in debugger mode (#10709)
ec872d1f6c add reviewer
056783366a comments
07eddeb6b1 use internal GADTs to ensure that Cunknown and FKprivate do not leak
024007974f make field_kind and commutable abstract types
f44236171d specify that caml_alloc_custom_mem is available since 4.08 (#10704)
a7bf9cbaf3 Improve type variable name generation and recursive type detection when printing type errors (#10488)
d17f6f1a19 Merge pull request #10706 from dra27/changes-needed
87b02aee9d Merge pull request #10702 from MisterDA/win32unix-cast-strictly-aligned-pointer-stat
dbb60dc4ee Fix cast of more strictly aligned pointer
f1d2830b7f Disable the commit message Changes escape hatch
9417670a0d Merge pull request #10705 from wiktorkuchta/dotmerlin
7ef6094f59 Allow the native toplevel assembler to be replaced
dd042539c6 Introduce native-toplevel specific hooks module
85ba4d7494 Make Topeval.phrase_name less exposed
89b4062ac4 HACKING.adoc: Remove mention of .merlin files
542151096a Factor out load/lookup functions in native Topeval
dc90ad4944 Remove duplicated type definition in Topeval
0be3ae695b Merge pull request #10690 from dra27/build-toplevel-lib
294e717a74 Merge pull request #10693 from lpw25/fix-includemod-ident-collision
c937590071 Merge pull request #10692 from gpetiot/expose-parse-module_type
826a6b4e85 Merge pull request #10694 from MisterDA/readme-win32-cygwin-64bits
cd794ec0fb Always build ocamlnat
42aa9631f2 Add Changes entry
301ffcfd8a Add changelog entry
f1c53b8a7c On Windows, advise to build with 64-bit Cygwin
1ccade8d41 Fix ident collision in includemod
5f77554bbe Expose Parse.module_type and Parse.module_expr
0b3f8dd77d Merge pull request #10658 from shindere/ocaml-version
41cac4b5ce Add detailed information about the current version of OCaml to the Sys module
0239407657 Make the documentation of ocaml_version in stdlib/sys.mli more precise
1acc501adc Add a macro to explicitly control whether this is a dev version or not
05f1d2ef96 Move version check from tools/check-parser-uptodate-or-warn.sh to Makefile
38449ab1b0 Let manual/src/html_processing/src/common.ml be generated by configure
47e7dc8e85 Let configure rather than make generate manual/src/version.tex
b64a764a31 Add --enable-native-toplevel
9ab0d9d036 Always build the native toplevel libraries
c6a3496711 Update comment in utils/config.mlp
89b1c6efa7 Remove the reference to the VERSION file from tools/pre-commit-githook
86b9930082 ocamlyacc: rely on runtime/caml/version.h
20924c9e26 Introduce the OCAML_VERSION_EXTRA C preprocessor macro
74ad8eb2b1 Add copyright header to runtime/caml/version.h.in
c71428e7a3 Transform runtime/caml/version.h into a configured header
b9ec96722d Document where the OCaml version is defined and how to update the VERSION file
ce97e67006 Define OCaml's version in build-aux/ocaml_version.m4
e9eb2fb5f0 Restore the -native option in Inria CI'sother-configs job
45612f14af Revert "Merge pull request #10682 from gpetiot/fix-letop-binding-loc"
93c99bac88 Merge pull request #10675 from xavierleroy/runtime-macro-deprecation
f0bdb45572 Changes entry for #10675
d57a4bdf55 Remove tests/compatibility
e88608c8e8 Rename field of internal structure from `alloc` to `allocated`
b7ec62b56f Deprecation of C macros, continued
f63965c1e4 Extend CAML_DEPRECATE to VS2019
e165c285ee Deprecation of C macros
9ee7de9278 Merge pull request #10682 from gpetiot/fix-letop-binding-loc
b3b3d35f4a parser.mly: fix locations of letop-bindings
5396b14423 Merge pull request #10676 from shindere/inria-ci-test-pic
d5f5076624 Fix an overflow bug in major GC work computation (#10680)
d5cdbbb775 Documented M, m, n, w, W, t, c and H options of OCAMLRUNPARAM, Fixes #8697 (#10666)
ba2dc5342f Merge pull request #10679 from dra27/absolutely-CC
98e16f0334 Merge pull request #10659 from lpw25/fix-freshening-substs
a112ad8bd6 Add Changes entry
134a55dfee Bootstrap
10074989bb Fix freshening of identifiers
1ab49ceb58 Merge pull request #10678 from lpw25/expose-warnings-description
fc543aa54a Add Changes entry
f23e9745ad Expose descriptions in Warnings module
f1be534e3d Use $cc_basename in configure for detection
f4d6410448 Allow for gcc with prefixes in configure
667a9eb8cb Also test --with-pic in Inria's other-configs CI job
8f713c59f7 Fix script for Inria's other-configs CI job
6e053e0dbb Str library: avoid global state in RE engine (#10670)
082341c298 Do not use obsolete macro 'Modify'
3eb0ab091f Install Changes, LICENSE, and READMEs (#10669)
07dfba8594 Add {In,Out}_channel.with_open_{bin,text,gen} and In_channel.input_all (#10596)
64023f55c6 Ignore `_opam` in git and check-typo. (#10649)
537a707540 Release howto: enumerate all opam packages
adc906e67e remove comments about repr-ing (#10665)
ab0c892cfa Merge pull request #10662 from gasche/pr10661
aa8100ae2e Merge pull request #10656 from dra27/check-typo-fixes
8da8b7e028 Merge pull request #10382 from lpw25/clean-envs-check-type-decl
a20ae64440 Add Changes entry
17294adcdb Bootstrap
60c2126f1d Don't repeat environment entries in Typemod.check_type_decl
c8c3a95a97 Merge pull request #10582 from kit-ty-kate/source-highlighting-tabs
3151f1f138 Add more merge constraint tests
e93f6f8e5f Merge pull request #10504 from dra27/systhreads-configure
da4515c289 Merge pull request #10621 from dra27/simplify-shared-configure
e0d1668e27 fix indentation (#10657)
38b9d45f66 Merge pull request #10644 from wiktorkuchta/typedecl-t
8d3c2e0a18 check-typo: check for executable after pruning
8a3dee3cf0 check-typo: prune directories in .gitignore
3748449025 Merge pull request #10516 from gasche/switch-types
46b5e1d577 [minor] switch.ml: distinguish types for arguments, tests and actions
43af0f8901 [minor] make Bytegen.comp_primitive a robust matching (#10646)
b44c16eaac manual: Fix inconsistent styling in typedecl.html
74f89236ea reorder the 4.13 Changes
0a18ad2597 .mailmap update
9d537af8a8 (very important Changes cleanup)
a517a240b7 Synchronize 4.13 and trunk changes
5158c85e0f Buffer documentation tweaks (#10525)
f406684bb4 Fix a flaky test by refactoring TypePairs (#10638)
359f46f224 Add `Out_channel.{is,set}_buffered` to control buffering of output channels (#10538)
8a3347438b Merge pull request #10635 from dra27/freestanding-sak
0d4065b749 Merge pull request #10632 from dra27/fix-10630
0bcaddb887 Merge pull request #10637 from gasche/outcomdetree-constructor-record
8420375777 [refactoring] Outcometree: introduce a record type for constructors
e20fe18de4 Restore minor heap pointer after a Stack_overflow (#10633)
69ba948203 Allow the C compiler to be overidden for sak
f9fe08c9c1 Expose more Pprintast functions (#10618)
84a5813756 Ensure -fPIC doesn't get passed to an assembler
61ecb0735d add immediate attribute (#10622)
0f2cbf6d3d Merge pull request #10629 from nojb/bigarray_c_elts
531bb0400e AMD64 integer multiply immediate cannot write result to a stack location (#10628)
68cdc38ee4 manual: add missing Bigarray C element kinds
f1b9c23d18 Merge pull request #10421 from sliquister/gc-doc
7ad8c13683 Force normalization on access to `row_desc` (#10474)
7317226e4c Small refactoring in predef.ml when computing the initial environment   (#10597)
75680ff87b Fix performance regression introduced in 4.08 (#10624)
a2cef4d71b #10598, fix exponential blow-up with nested module types (#10616)
cffde3184d Merge pull request #10619 from shindere/fix-o-regression
0117428c3e Support more arguments to tail calls by passing them through the domain state (#10595)
817796733f Pack ocamldebug modules to minimize clashes (#9621)
9410b9c91a Limit CSE of integer constants (#10615)
b8efbfb0eb Fix marking of if condition as inconstant in flambda Fix #10603 (#10611)
36940c6dcd Clarify flexdll.h/flexlink warnings
87036673b4 Simplify configure for shared library support
ba4dad634b Merge pull request #10511 from dra27/cygwin-without-flexdll
c1099dff6b Fix regression introduced by #9660
de6be27675 Correctly configure Cygwin when flexdll missing
3e85887d68 Merge pull request #10602 from jmadiot/manual-errormsg-pre
1be4fa768f manual: fewer hevea-generated css classes (#10605)
fa43873b3b Merge pull request #10599 from stedolan/lazysigs
c35fc2cb02 Style changes
335cf1ace8 alldepend & whitespace
ee57207099 Bootstrap
9b1c5bca86 Changes
b7efd52b9b Lazy environment scraping in Mtype
143dadbde5 Add Env.find_strengthened_module
27f1686aa7 Optimise Subst composition with identity
b44e5fdf70 Strengthen module types to aliases
3fb495f9c3 Lazy Env.lookup_modtype and Env.lookup_module
46f803efb6 Lazy strengthening and module type declarations
397ac57f9d Lazy signature substitutions
cd105d99ba Deobfuscate ignored-partial-application and non-unit-statement check (#10606)
93b7f1c73e manual: keep white spaces in error messages
6a12ddb222 Merge pull request #10601 from Octachron/manual_separate_library_tex_files
c96ba796ab Merge pull request #10587 from dra27/remove-SRC
632cb780e0 manual: fix odoc build
e616d72866 Move #10471 to 4.13 section
cd3b2d0035 Correct Makefile include'd in manual
1a5000f418 Merge pull request #10489 from dra27/main_os
3a0b1b1e15 Merge pull request #10451 from dra27/no-scripting-for-4.13
5fe616551e manual: more explicit include of module documentation in latex mode
4e9eb755e6 Add various fast-paths in typechecking. (#10590)
5ba9e0e0d6 Merge pull request #10588 from dra27/manual-mkdir-again
dbce6c200f Merge pull request #10593 from voodoos/fix-untypeast-for-patterns
eccaa452ca Add {In,Out}_channel to Stdlib (#10545)
011e05309a Support debugging multithreaded programs until they create threads (#10594)
8d93e23625 Add Changes entry
e929691fa1 Fix untyping of patterns without named existentials
452a9e1283 Add a test illustrating wrong untyping
b4a6d23f5b Add missing reviewer
2c7c86adce Merge pull request #10586 from dra27/fix-manpages-partial
6905c8986d Clarify: it doesn't need to be that complicated
fa2e1ccf14 Remove unnecessary CAML_LD_LIBRARY_PATH
a4ac8615d9 Remove unnecessary COMPFLAGS in manual
1951ae0fbb Eliminate need for abspath
a9e71bd760 Fix incorrect pattern rule
ffee03bb71 curl quietly
e6d42ce95a Use ROOTDIR not SRC in manual build system
e517c653c9 Remove no longer used SRC from ocamldoc/Makefile
d12ddb5a12 Fix manpages build when libraries are disabled
23c8433d30 More parameter passing registers for Power and s390x (#10578)
7a40c57ed8 Merge pull request #10565 from wiktorkuchta/string-trunc
c644bdfd25 oprint: Truncate strings only after 8 bytes
97d57dedff Add a Changes entry
6711b12463 check-typo: highlight_tabs.ml contains tabs
ef16261ae4 Error source highlighting: align using tabs to match tabs in the source
c7aa1a9009 Add a test for error highlighting in presence of tabs
b5ffb01571 manual: Fix typo in GADT examples (#10581)
600733aa78 Merge pull request #10580 from Fourchaux/typos
2ba87eeb16 Typos
90c1365901 Add the missing license field to the opam file (#10579)
812436fd30 Change inlining cost of flambda switches. (#10458)
f5674ecbc5 Remove Obj.{marshal,unmarshal}. (#10568)
672965bfda Merge pull request #10549 from xavierleroy/arm64-signals
50495f632a Changes entry for #10549
12523517cf Support naked pointer checker on ARM64/Linux and ARM64/macOS
b36a5708c6 Add stack overflow detection for ARM64/Linux and ARM64/macOS
3770a8708e Add signal-handling macros for ARM64/macOS
d9519e0773 Cosmetic: reorder cases in signals_osdep.h
1bd0e663b6 Merge pull request #10558 from Octachron/apply_selective_typing_prim
70750e2038 restore %apply and %revapply for abstract types
3371e635e9 fix the dune build after #10577
091f5d4b64 Merge pull request #10577 from shindere/configure-sys
b88604d8f7 Merge pull request #10574 from wiktorkuchta/remove-htmltransf
718990c2cf Let configure generate stdlib/sys.ml
851d0ff6aa Add naked-pointers flag to `ocamlc -config` output (#10531)
172bec8073 Remove manual/tools/htmltransf
2642557895 Merge pull request #10573 from Octachron/parsetree_typo
1393ccabb1 Fix a typo in parsetree.mli
f0d61fa106 Merge pull request #10497 from wiktorkuchta/webman-css
9671c8769b Add Changes entry
7f58ef0211 Merge pull request #10567 from v0idpwn/patch-1
53659d6fbf Update IRC info
fb99b2be83 Tidy-up the testsuite/manual commands (#10411)
da44d603ab Merge pull request #10380 from dra27/cygpath-locale
1dc70d32da Merge pull request #10195 from stedolan/mark-prefetching
00c84b8a1c Add set_uncaught_exception_handler to systhreads (#10469)
6abc9727d2 Disable colors if NO_COLOR env var set (#10560)
49c81d7089 Move 10442 to 4.12 maintenance section
4b6c210dda Merge pull request #10446 from dra27/fix-10442
80482ed60b parser.mly: location fixes for type constraints and punning (#10555)
53430f21c9 Restore Toploop.use_file (#10557)
3b5812a0a0 Merge pull request #10539 from COCTI/revert_dup_kinds
a5bd913f51 fix bug of non-shared field_kind
01777771e5 Revert "right way to duplicate field kinds"
a6a071c2f8 fix pretty-print of gadt-pattern-with-type-vars (issue #10550) (#10551)
d269e04acf Restore old loop logic in prefetch GC
90f648ca07 Rebase & unbreak naked pointers checker
4a7577d430 Optimise instrumented runtime mode in marking
1a7b84dd53 Fix an off-by-one error
02c4f42efc CAML_INSTR support for mark prefetching
58a25975c2 changes
1d35b2573d typo
ba2fd8ae8a bugfix for redarkening logic
369e2ec70b changes after review
401bf4811e cleanup
3354bab3ab Speed up GC by prefetching during marking (prototype)
8949e28fa1 fix no-flat-float-array tests after #10542
44e473e6a4 Compiling for HaikuOS 64 bits  (#10546)
328b0b7ce0 Merge pull request #10542 from lpw25/fix-unboxed-immediate64
3723072576 Add Changes entry
59fae6784c Fix detection of immediate64 types through unboxed types
9c67b253f6 Fix mapping of intervals in Ast_mapper (#10543)
d53908d714 Add doc for ocamldoc's cross-ref with text (#10536)
1271f676e7 Merge pull request #10471 from AltGr/arm32-musl
ae87e89535 Merge pull request #10448 from damiendoligez/fix-bootstrap-ci-script
82755626a4 Merge pull request #10535 from nekketsuuu/nekketsuuu-subsub
d5ae88280d Merge pull request #10537 from nekketsuuu/nekketsuuu-mkdir-webdircomp
c973882e03 Remove comment about HP/UX 9
d9558baf2d Fix private polymorphic variant inclusion (#10529)
7090cc3810 minor fix: mkdir before copying CSS for webman
cc739fde51 webman: Remove chapter number on subsubsection correctly
50deeb2d87 Add explanation for shorthand representation of functor with multiple arguments (#10530)
011d316a3b Merge pull request #1599 from dra27/win-env-tests
cdc32182ae Merge pull request #10526 from xavierleroy/more-random
49b9cd3e30 webman: Center BNF syntax bars `|`
d56cbd0463 webman: Italicize command-line argument variables
27ae0f55e2 webman: Styling for Unix/Windows specific blocks
321a2279e2 webman: Add padding to .cellpadding1
cfb2545d9b webman: Add spacing to tables for aligned exprs
f6355cf1a7 webman: Fix variables being bolded, not italicized
afe24ba70b webman: Make table headers bold
e311dabeeb webman: Center tables
7c1fd96f3a webman/api: Improve constructor color contrast
cfd3c039f6 webman: Remove styling for the ordinal "th"
a50a4d42f8 webman: Set (mathematical) variables in italics
b4eb567b0d webman: Set command-line arguments in monospace
8900ac5521 webman: Use SCSS variables for font-family
61764cc647 webman: Increase heading font-weight
d5fe4293e6 webman: Make display style blocks centered
ef6d0501ae webman: Italicize grammar symbol names
a194d25e0e webman: Follow inline code styling of htmlman
f8390bc460 webman: Remove colored background for inline code
986e8329c5 gc.mli: tweak phrasing
5dc1b2f510 use the Opam way of making "sed -i" portable
5f0cbe101b Merge pull request #9424 from bobot/fix_Ephemeron_segfault_with_missing_write_barrier
4a93ebb12a Random: add functions bits32, bits64, nativebits
0ff72d96d0 Merge pull request #10524 from wiktorkuchta/directive-error
3c97584f46 Show expected and received type on directive error
c329c2c0b7 Merge pull request #10522 from xavierleroy/no-ligatures
fb1af2e229 toplevel: Move running directives to Topcommon
f203a5d45d Run the Polling pass earlier (#10523)
aededd1364 Remove `\usepackage{ae}`, redundant with `\usepackage{lmodern}`
265bba9394 Disable ligatures in typewriter fonts
9f1b1ed637 Merge pull request #10500 from gasche/comment-on-match-exn
ff86950c25 [minor] make Lambda.Not_simple local to its only user
1940cb007b [minor] remove unused exception Switch.Not_simple
1475d99119 [minor] a code comment on match-with-exception compilation
b3d2cdcbe6 Merge pull request #8516 from lpw25/simplify-type-class-structure
73b648e6db Add Changes entry
e8dd0178a2 Add helpers for warning_scope in typeclass.ml
990ea08408 Remove unused csig_inher field
964a13c31b Move method spine generalisation logic into Ctype
dbd5002427 Change warning 13 message
dc351b3c7d Rename Concr
f7e6b79738 Keep class signature row up-to-date
a7f13f9acb Merge pull request #10506 from wiktorkuchta/refman-ext
4716c8e063 [Weak] keep *set_* and *blit_* from breaking marking invariants.
6909cadc72 [Weak] Add a tests for ephemeron setting above not alive keys
a1b917ad7e Merge pull request #10400 from dra27/debian-i686
b7ef616ff7 Set object name of self type
19203f86f1 Fix warning attributes in class signatures
845ac93066 Treat class_signature more like type_expr
8f9b7667ab Remove private_self and public_self
e6aa05bf93 Track dummy methods via their scope
b43ecd16db Represent ancestor variables more directly
1aa65fa967 Give more precise errors for virtual methods
013717de96 Add dummy methods in all cases
37c5cb1d30 Bootstrap
6e5b86355a Change representation of class types
3ca0fad1ba Tweak configure for supporting arm32 archs with musl
6ad7a11a58 Revert "Remove propagation from previous branches (#9811)" in trunk (#10492)
caf5108506 Collect vars and meths without references
b28ce4ac22 Build met_env on second pass
0ca24f9d10 Relax object duplication restrictions
73c8addba2 Make the two-passes of class_field explicit
a734bc6ae5 Add more classes tests
08d93dd02d manual: Move "Private types" into its own file
c5e96ec070 manual: Fix module aliases section appearing twice
e608b7c95a Give caml_send* arguments the correct types (#10498)
a20e0a7efc Merge pull request #10502 from gasche/fix-dune-build
b1f4d7b2ad stdlib/genlex.{ml,mli}: use attributes to turn deprecation alerts off
54ce3bee52 dune: tell dune about asmcomp/polling.ml
91058bd6f3 Disable systhreads if unix isn't built
80a40377dd Use DOES_NOT_EXIST to clarify expectation
24f565bcf1 Always restore alteration to environment string
de11da3096 Use for instead of while for stepwise loops
39d29beb0f Environments.remove -> Environments.unsetenv
551af346f3 Changes
bc527fc4c1 Correct indentation of function clauses
791dd868c1 Use unset in the testsuite to harden tests
30256c0de4 Add unset directive to ocamltest
0fc19c04a4 Harden win-unicode test against putenv failure
e7161fdd1a Eliminate open Unix from testsuite
ddd9ec2a91 Deprecate the Stream and Genlex stdlib modules (#10482)
3e69d9db43 Revert "Give caml_send* arguments the correct types (#10461)"
1b3ffee3f1 Changes entry and comments for Safepoints (#10039)
758fc7ddd6 Safepoints (#10039)
6a42e42306 Give caml_send* arguments the correct types (#10461)
9209a4f757 Merge pull request #10493 from wiktorkuchta/binutils-install
ea7c8bd522 Mention binutils as installation prerequisites
7053a45357 #3959, #7202: in script mode, handle directive errors (#10476)
98a27ddf9d Merge pull request #10487 from nchataing/cstr_res_unfolding
363f8dcf07 Update change entry
1c7e469f21 Compute STDLIB_MODULES with a C auxiliary
7a529fbafa Abstract wmain/main difference with main_os
7087674e08 Update dependencies
679528770f Move function from Types to Btype
a37a7e2d87 Add Changes entry
2953c5be97 Move logic to get the type path from a constructor return type in Types
0c2eb39351 [doc] Fix: String.{starts,ends}_with introduced in 4.13 (not 4.12) (#10486)
005ba108db Add comment to amd64/emit.mlp about caml_c_call (#10481)
cbbb5e025c Allow explicit binders for type variables (#10437)
424a2f6727 Merge pull request #10472 from gasche/caml_sys_random_seed
46ec3beac7 caml_unix_random_seed: clarify fallback logic
54bedf4344 caml_sys_random_seed: split unix-specific part to its own function
e1a37e1a9e Merge pull request #10475 from xavierleroy/doc-undefined
37257fb488 st_stubs.c: fix initialization of thread ID when a thread starts (#10478)
e988cb9843 Merge pull request #10473 from edwintorok/riscv-cfi
e390e6473f Merge pull request #10361 from Octachron/semdiff_type_decl
0692959556 Changes: add entry for RISC-V CFI directives
9136587829 Changes for #10475
570721f186 Documentation of iterators and concurrent modification
e015077bf0 asmcomp/riscv: emit CFI directives
d4b73d36a3 runtime/riscv.S: add DWARF CFI directives
26cc0f65a1 runtime/riscv.S: introduce END_FUNCTION macro
650ba029a5 Remove unused cstr_normal field from the constructor_description type (#10470)
47e5a7acb6 Normalize type_expr nodes on access (#10337)
f68acd1a61 Merge pull request #10192 from MisterDA/windows-unix-domain-sockets-socketpair
11c5f76d29 Split labels and polymorphic variants tutorials; move GADTs into tutorial (#10206)
ec880ee809 Pun labelled arguments with type constraint in function applications (#10434)
fb81f86756 update Changes for #10361: add reviewers
4d5f4f2037 diffing_with_keys: switch to a record
b3d44c38fd Merge pull request #10468 from matthewelse/trunk
3cbf4fab97 Functorized diffing (with improved documentation) (#4)
69560194fc swaps and moves
16cb5722e0 diffing: adjust weight for fields and constructors
24434c4e1c update Changes
b8f0f2f569 more tests
8adc48b8b0 diffing for variant definitions
3cac9dd6c5 diffing for record definition
fe2dab7770 Emulate socketpair of Unix domain sockets of stream type on Windows
566350611b Factorize code setting cloexec/inherit flag on Windows
f40e8996aa Support Unix domain sockets on Windows
adb2dad313 diffing: define few common functions
bc0def2418 Add #10468 to Changes
9adfb96935 Correctly pretty print `Psig_typesubst`
32d25e7d97 Merge pull request #10407 from antalsz/pr-better-error-messages
0c993326e1 Respond to final round of review for #10407
2d62e825ca Make `Errortrace.*_error` only contain nonempty traces
4aacb71cb2 Add some extra periods to some new error messages for consistency
80855e2d2f Respond to more review for the structured error messages (#10407)
1820e785a5 Respond to review for the new structured error messages (#10407)
2abe3e4d3d Use the new structured errors (#10170) for better error messages
abd5490962 Add new test cases for failures of type-specific unification methods
7fad56ed20 Add more new test cases for module inclusion errors
79a60b42bc Add new test cases for module inclusion errors
7849115b07 Bug fix: `equal_private` was being used in too many places
d967318148 Remove Cmm.memory_chunk.Double_u (#10433)
70b03f9210 Filename.chop_suffix: fail cleanly when not a suffix
5bcddeb863 Document what happens on overflow in float -> int conversions
e5e9c5fed5 Merge pull request #10402 from Octachron/manual_ocamldoc_fix
12df60ccce Move #10454 change entry to 4.13 section
8b548de2e5 Merge pull request #10454 from lpw25/nondep-row-more
d5ff640550 fix Changes for #10449
dfc9f19139 fix work accounting in marking phase (#10449)
da57ec08f3 Add Changes entry
c6a50a3f58 Check row_more in nondep_type_rec
fc9a672251 Add another nondep test
aa890e2df4 Merge pull request #10328 from lpw25/better-disambiguation-error
526ea2a188 Add Changes entry
29151abc66 manual: document ocamldoc paragraph insertion
e22cbaf48f Merge pull request #10444 from Fourchaux/typos
40494f0038 Merge pull request #10447 from edwintorok/riscv
063cd86c18 asmcomp/dune: fix build on RISC-V
1768cbcfd5 Give more precise error when disambiguation could not possibly work
3ce12cb967 Fix ordering of dirs in Load_path.prepend_dir
f3d9587c30 Fix #directory in the toplevel
3d52bcad84 Rename Load_path.add to Load_path.append_dir
a741669681 Add repro case from Issue 10442
cff9abaabf Typos
0733be3c7c Changes: merge duplicated `Type system` heading for 4.13.0 (#10443)
83eca0dabc Remove unnecessary surrounding parentheses for immediate objects (#10441)
a208a29bcc Merge pull request #10438 from Zett98/runtop-eval-option
d0d877a9c3 added -e eval option for runtop and natruntop
1dce5eb240 first commit after branching 4.13
f779a50353 last commit before branching 4.13
dd7927e156 bump magic numbers for 4.13 (and trunk)
0ba253df46 stdlib: add Array.fold_left_map (#9961)
c19f9f7588 document @since for Format.stag (#10439)
f9066346fd improve documentation of live_words field of gc stats
1e15c0deaf Avoid overwriting closures while initialising recursive modules (#10205)
970407162b make CI bootstrap script compatible with Macos
da28d0e9bf inria ci: update remove-sinh-primitive.patch
7eaf05b3cf Added some missing C99 float operations (#944)
b5821db337 Add Random.full_int (#9489)
efbd3595c1 changes: fix issue number
cd65210491 Merge pull request #10430 from Drup/print_bytes
ef6b4b0c9a Add missing `Format.pp_print_bytes` function.
400540d393 Make build_other_constrs work with names instead of tags. (#10428)
1037341d8c Merge pull request #10408 from dra27/sys-time
9b0847d3e2 Merge pull request #9919 from dra27/tidy-prims-in-headers
efef92afec Fix caml_sys_time on Windows
756dd27995 Allow CSE of immutable loads across stores (#9562)
0340410346 Inria CI "main" script: do not lower priority on macOS
fd59303165 Simplify tools/Makefile (#10265)
600aad5d29 Merge pull request #10379 from lthls/remove-pidentity
fe96962fd4 Merge pull request #10252 from stedolan/unboxed-as-kind
ce2810b40a review
dc08b85b16 Remove primitives Pdirapply and Prevapply
2bc428664f Remove the Pidentity primitive
4ff6bc40bd review fixes
06ede5fdf5 Bootstrap
1820718aa1 Move type_unboxed.unboxed into type_kind
bd9ec5d198 Better compaction heuristic (#10194)
1a4fda312d dune: add asmcomp/dataflow.ml
f0ecd9b8aa Merge pull request #2245 from chambart/bytelink_order
da5fd2dd32 Improve error message for link order error in bytelink
6e3c90dfea Add %frame_pointers (#10419)
9b887df04b Spilling and reloading: avoid behavior exponential in loop nesting (#10414)
a7a5dbbb4e Merge pull request #10420 from stedolan/filter-arrow-comment
bba647eb93 Merge pull request #10416 from Octachron/detect_rec_in_show
846a2803d7 Fix typo
5eddf636c5 Merge pull request #10417 from dra27/10405-bootstrap
a3c655a00d Bootstrap
22e3e03f82 toplevel: detect recursive definitions in #show
5fbd6e15c8 Restore the tree after checking labelled modules
5e45b2e9fa Add a generic backward dataflow analyzer and use it for liveness analysis (#10404)
a6f9c4461d Merge pull request #10412 from gasche/env-store-datatype
25e376be04 Env: split store_type by adding store_{constructor,label}
9ffd97f3ee Merge pull request #10405 from trefis/subst-locs
7feef2d660 Merge pull request #10401 from Octachron/signature_group_2
8ce8bff9db Merge pull request #9809 from dra27/complete-suspicion
91285e0ad5 signature_group review: more symmetric interface
3ecc6cda20 Merge pull request #10135 from dra27/faster-flexdll
79f6c2228b Add {Int,Int32,Int64,NativeInt}.{min,max} (#10392)
e51a8a92eb review: Changes
5e7bcdb4d8 review: with_constraints delete or replace one item
b6ff5baeff signature_group review: next + unfold
4060c05ea0 Eliminate the ocamlopt not found error
08f9a8660d Use native flexlink during the build
23cae5b8a4 Use ocamlopt-compiled flexlink in testsuite
474255bb0e Control the flexdll bootstrap with configure
c555a5bd6e Allow bootstrapping flexdll for the Cygwin ports
375b7cd4bb Overhaul flexlink binary locations during build
b96040decb Always bootstrap flexdll if the code is present
731440fe59 Automatically bootstrap flexdll
5f87ca619c Bootstrap flexlink without partialclean
ea2b165323 Merge pull request #10406 from kit-ty-kate/fix-ocamldep-help
95e24f2429 Update the changelog
abb50647d2 Partially reindent Makedepend.run_main
a7e97d85ae Fix ocamldep -help
d0a466062f make depend
8fb2de19fb Changes
3b1b916a40 update test
fae4bbc0a4 update locations for destructive substitutions
09f9db599c bugfix: with constraints and #row component
49528a6944 Merge pull request #10307 from nchataing/env_refactoring
bb052b09e0 fix the dune build after #10170
5d26dfc724 Refactor type_descriptions in the typing env
099b86a046 Merge pull request #10170 from antalsz/pr-better-error-types
e48d97fed2 Merge pull request #10289 from Zett98/do_not_print_options_in_usage_message
00dfb07866 Fix formatting issues
e16653e908 Add missing copyright headers to `errortrace.ml{,i}`
7157ce2fc2 Add Changes entry for #10170
c8d8ef7ae2 Fix names of arguments to `Ctype.{,raise_}scope_escape_exn`
1d2ad7742d Replace `report_error` and `trace_format` with 3 separate functions
ee9dd52d42 Return `prepare_expansion_head` to the global scope
16564969f6 Change `Printtyp.trace_format` into a GADT and expose it
bd030c0e12 Address all the excellent reviewer suggestions
e87be39194 Maintain more structural information in type-checking errors
14ff896d91 Add tests before improving the internal type error representation
b5a5f01383 Fix minor bug in `Ctype.full_expand` and document invariant
6da9c31652 dont print options in usage msg
e0745c14e6 more documentation
72a87e1989 update Changes
c52f1d06c2 with constraint: ignore ghost components
9ce0b9b364 Signature_group: replace_in_place
206fbfa516 include shadow all items in a group:
e3af864038 Signature_group: ghost-aware iteration over signatures
2427ba7cb6 [refactoring] Typemod.simplify: use List.filter_map for readability
9107f181ca floats.c: small optim of caml_{frexp,modf}_float (#10398)
07ab35957d A little precheck environment info
c04c072537 Merge pull request #10146 from damiendoligez/ocamltest-move-test-block
c4c637d9f3 Tune i386 test to be 32-bit mode of x86-64
fb4141cb59 change keword for postponing test block
2a4aa7a324 Merge pull request #10396 from Octachron/revert_list_printing
f6edb38adc Revert "Merge pull request #9336 from Octachron/mundane_list_printing_fix"
aec3ecbfc7 Test evaluation order for for loops (#10394)
62d89c046b Merge pull request #10384 from dra27/tabular
aef2562713 Merge pull request #10390 from gretay-js/update_dune_build
fb89e81169 Merge pull request #10385 from Octachron/6985_more
4c6ff22df8 Add emitenv and cmm_invariants to dune file
5776b22b15 partially fix the dune build
257c4d88d1 mtype: remove ghost row types from strengthened signature
6275c0ccda Fix handling of exception-raising specific operations during liveness analysis (#10387)
5152c5249f Refactor Makefile.compilerlibs
265467c1b6 Harden Makefile TAB rules in check-typo
a376cbf8f1 Have update_scope_rec only recurse in principal mode (#10383)
04e9f14aec Convert erroneous tabs to whitespace
f31d422285 Don't emit tabs in prims.c
53890ca007 Refactor one ifeq not to use continuation
118b17afbf Change the configure message not to contain tabs
9280a4b456 The invariants.cmm test should be run only when the native compiler is enabled
159db72136 Merge pull request #1400 from lthls/cmm_invariants
ed17834964 Add David Allsopp as reviewer
49b3574e5f Changes
6ff3561fba ocamltest: add the codegen_exit_status variable
9818f7aaa2 Added fold_{left, right}, exists and for_all to String/Bytes (#882)
b6ef1efa2a Merge pull request #10352 from gasche/Seq.concat
88676f6db6 Use build_config.h instead of -DOCAML_STDLIB_DIR
95d5ce027a Set LC_ALL when calling cygpath in configure
5133961359 Use correct canonical name for Cygwin64
620f2cb93c use a marker at the top when the test block is at the end of the file
ebddee737b ocamltest: allow TEST block at end of file
a672887fe0 Seq.concat: 'a t t -> 'a t
85c2012021 Merge pull request #10376 from dra27/output-complete-obj-msvc
e4b6bfa06c Merge pull request #1819 from shindere/bootstrap-doc-update
90def1a36a BOOTSTRAP.adoc: mention an alternative way to test the bootstrap
60039cd4c1 Modernise Ccomp.expand_libname
0b39a30939 Merge pull request #9632 from lthls/opam-incremental-builds
ca9b5f991e Changes
34fd9d060b Update expected test
ae9555bbb1 Merge pull request #10377 from dra27/ocamltest-quoting
8b1bc01c31 Set up execution environment before launching a CI script
5260392143 Merge pull request #10366 from shindere/ocamlrun-build-variable
7c46b03e04 Update Changes
55b33ba5b3 Build system: simplify the compilation of the caml-tex tool
54a33a3781 Clarify the way `make runtop` works.
2f4f677f59 Add a Changes entry
70e21f77fc Introduce the NEW_OCAMLRUN build variable
e0c77200c3 Build system: use boot/ocamlrun rather than runtime/ocamlrun in some places
2a9c7b61c8 Build system: rename the CAMLRUN variable to OCAMLRUN
ff32380dd6 Build system: replace suffix rules by pattern rules
687a2e8d82 Merge pull request #10373 from Octachron/existence_precedes_essence
98430d1a8b Run tests/output-complete-obj/test.ml on Windows
637b9fca96 Call the partial linker correctly on msvc
d60da30752 Support both quoting styles in ocamltest
64044dd668 tweak error message for unknown constructors or fields
90d52931b5 Updates and fixes
95e55306a3 Update to take opam-custom-install into account
ddd70be4a7 Document incremental build solutions with opam
eaf2aaf96d Fix #10338: Translcore.push_defaults does not respect scoping (#10340)
36042d0623 output-complete-exe: do not generate .cds file (#10371)
f916c7b736 Merge pull request #10360 from EduardoRFS/refactor-format-of-tpackage-merge
4f4e46af44 Remove the availability analysis (#10355)
bbbe9e559b Disable manual build temporarily
c8abad8526 Merge pull request #10303 from dra27/fix-10302
24d7f3bde8 Introduce per-function environment for Emit (#8936)
430c134435 Merge pull request #10368 from dra27/bootstrap-docs
7882a4ee27 Merge pull request #8929 from Octachron/printtyp_fix_nested_recursive_definitions
a09a84f9a7 Merge pull request #10365 from shindere/build-system-cleanup
c0a233a5b5 Update BOOTSTRAP.adoc for changing primitives
b9acbd6711 Merge pull request #10363 from Octachron/ocamldoc_entities
207035bcc7 fix printing of nested recursive definitions
01b32afefa Build system: remove now useless line from Makefile.config.in
2264171349 Merge pull request #10327 from shindere/ocamltest-files-subdirectories
6422902a9c ocamldoc: escape <, > and & in html backend
94faefd5da Add convenience pretty printer for `Either.t` (added in 4.12) (#10242)
f7974c9efa unify field name and type on Tpackage
2217ed8fd5 Merge pull request #10045 from dra27/csharp-mingw
7b44b5323a Add a Changes entry
e5baa87996 Get rid of the setup-links.sh script in the tool-ocamldep-modalias test
9256944766 Use the copy action in the tool-ocamlopt-save-ir/start_from_emit.ml test
d841571cac Use the copy action in the tool-ocamldep-modalias/main.ml test
b16c2f5ff1 Use the copy action in the missing_set_of_closures test
43ede500f9 Use the copy action in the opaque/test.ml test
c5a82d9525 ocamltest: implement a copy action
c9181a1e84 no-alias-deps/aliases.ml: rename b.cmi.invalid to b.cmi
823a8e9e7f Slightly simplify the tool-ocamldep-modalias test
8b565ab16b Rewrite the typing-missing-cmi test to use ocamltest's subdirectories variable
ddd910d96a Rewrite the tool-ocamldep-shadowing test to use ocamltest's subdirectories variable
6d69290746 Rewrite the missing_set_of_closures test to use ocamltest's subdirectories variable
97198d62f7 Rewrite the opaque test to use ocamltest's subdirectories variable
e8a1b21928 Rewrite the lib-dynlink-private test to use ocamltest's subdirectories variable
66297e6d6b Put lib-dynlink-private in a correct form
3804a99a82 Slightly simplify the lib-dynlink-private test
2e5a4d02b3 Rewrite the lib-dynlink-pr4839 test to use ocamltest's subdirectories variable
ad828c2525 Rewrite the lib-dynlink-pr4229 test to use ocamltest's subdirectories variable
da1920e247 Rewrite the lib-dynlink-native test to use ocamltest's subdirectories variable
e8cee9623e ocamltest: introduce the subdirectories variable
7c0d049f85 ocamltest: rename the files variable to readonly_files
48d800cf57 Fix #8575: Surprising interaction between polymorphic variants and constructor disambiguation (#10362)
848d54d45c Merge pull request #10358 from lpw25/tbl-in-load-path
2af9bd9b48 Add Changes entry
0f83d55f25 Use hash tables for the load path
787624ac2a Fix test to avoid building manual in forks
430c60ee71 Test file (WIP)
2a969c01c9 Ensure installed stdlib artefacts have correct case (#10301)
d50339d4a1 Merge pull request #10354 from xavierleroy/specific-operations
94e74742e1 Enable Cmm invariants on some CI runs
7bac5a91f8 Add --enable-cmm-invariants configure flag
846735684f Treat Ialloc_far as not pure and susceptible to raise
15e635462b Fix handling of exception-raising specific operations during spilling
8bf201b8c7 Refactor Proc.op_is_pure and fix Mach.operation_can_raise
b7bc826e4b Merge pull request #10219 from Octachron/printtyp_explicit_syntactic_groups
f823915210 Merge pull request #10357 from dra27/testsuite-cygpath
c46389154e Merge pull request #9957 from stedolan/remove-enforce-constraints
89a489a966 review: comments and constant propagation
1ae91bb361 Add cmm-invariants to OCAMLPARAM
5a83b92072 Remove Ctype.enforce_constraints
9f29f9a67f Remove a call to enforce_constraints when checking GADT patterns
1425135c66 Remove a call to enforce_constraints when checking type declarations
da95d2863a Remove a call to enforce_constraints when constructing types
71fb042b3f Fix .depend
d504b58650 Add Changes entry
9b2c634513 Add an optional check for invariants on the Cmm representation
091bff3376 Merge pull request #10225 from EduardoRFS/fix-dune-build
3c29f13eaa dune: fix main.exe and optmain.exe build
9272ef4ad3 dune: fix main.bc and optmain.bc
8604cbe8b2 dune: fix ocamltest_config.ml
d3643c6813 remove Typecore.create_package_type unused helper (#10356)
f20c30e15d Fix testsuite MKDLL for bootstrapped flexlink
d12738a234 Merge pull request #10243 from dra27/check-configure
eed1110e6a make update_scope recursive while keeping trace_gadt_instances (#10277)
77115193cc Merge pull request #10297 from dra27/ocamltest-rm_rf
178cca1bab Don't follow symlinks in rm_rf
72f76f40b4 Merge pull request #10309 from dra27/win32unix-errno
856b7251a1 Fix ocamltest's rm_rf function w.r.t. symlinks
c0c241e073 Merge pull request #10346 from dra27/fix-makefiles
38fb9e0a94 Fix mingw-w64 DLL support with binutils 2.36+ (#10351)
6da8fd5a33 Remove slightly gratitutous make macro uses
0df6bc9e05 Correct rules in Makefile.compilerlibs
4bcd7e6d0f Merge pull request #10245 from stedolan/remove-cyclic-abbrev-check
50a7877f72 Merge pull request #10310 from dra27/restore-spacetime-option
4dca3c3c6b Merge pull request #9336 from Octachron/mundane_list_printing_fix
adcb23f298 Merge pull request #10350 from dra27/tweak-actions
7931817474 Merge pull request #10341 from gasche/manual-caml-example-in-cmds
be53454367 toplevel: identify list by their types
93a9b2dc91 Fix destroyed_at_c_call on RISC-V (#10349)
60f9d2f177 Fix #10271 using Env.remove_last_open (#10308)
3abccf87f7 Do the homework promised in #10199 (#10347)
3a42a43b15 Fetch from the correct place when deepening
422eb95503 Fetch 50 commits in the full-flambda workflow
e06ba31282 Add missing Iopaque case to Proc.op_is_pure for RISC-V (#10345)
791f8195fc Merge pull request #10217 from damiendoligez/fix-9853
2c85ab7344 warning cli: tweak single-letter warning deprecation (#10312)
b720b583a1 Keep Sys.opaque_identity in Cmm and Mach (#9412)
e3a3d3d4b7 Merge pull request #10344 from dra27/config-var-doc
bb74b8d35e Merge pull request #10336 from dra27/test-manual-in-gha
3047ad8aa9 Fix realpath test (#10326)
2fee7a8e54 Fix bytecode compilation of Lsend(Cached, _) (#10325)
06735ef77e Merge pull request #8732 from Octachron/remove_fixed_type_error_2
505d4ec926 Merge branch 'trunk' into fix-9853
75902a8713 Merge pull request #10140 from gasche/require-full-labels
b92682336d Merge pull request #10097 from gasche/lazy-map
9c28b74749 manual/src/Makefile: simplify the build of warnings-help.etex
d2e6320a24 manual: enable {caml_example} in cmds/
782f6df808 escape @ in etex files
2e25fec094 Merge pull request #10335 from shindere/remove-makefile.tools
d3f6c33059 Correct documentation of -config-var
7c379d3787 review: Typedecl.set_fixed_row -> set_private_row
7d827537fb Limit the automated build on push to ocaml/ocaml
09444ef6a0 Update Changes
08c7d829e0 Labellize Typedecl.transl_with_constraints
62c4b0a2ba explicit and rename Bad_fixed_type errror
3d93b0b3fa more documentation for map_val, suggested by Stephen Dolan
9ee6e6d829 move opportune_map into the already-forced section, rename into map_val
a93d732587 adapt the manual to discourage labels-omitted applications
b3ad2a4921 fix the testsuite
d3fc1261a7 enable warning 6 [labels-omitted] by default
57a1e33b49 Build system: provide a default value for OCAMLLEX
4784566aeb Remove Makefile.tools, now unused.
6130791b9a Stop using Makefile.tools in the makefiles used to build the manual
09c940f579 Lazy.{map,opportune_map} : ('a -> 'b) -> 'a Lazy.t -> 'b Lazy.t
812f5462a0 lazy.mli: create documentation sections, make some explanations more precise
958e2cd60e Ensure PDF manual is tested
359e1c4929 Merge pull request #10334 from stedolan/fix-32b-gc-debug-build
61722caf8b testsuite/Makefile: stop using Makefile.tools
c63cb262ed testsuite/tools/Makefile: stop using Makefile.tools
a9511cedd8 testsuite/lib/Makefile: stop using Makefile.tools
4c77dca743 Makefile.tools: remove the unused OCAML variable
05f03c9504 Makefile.tools: get rid of the unused OCOPTFLAGS variable
768e9568db Makefile.tools: remove the unused DIFF variable
980e598b31 Makefile.tools: remove the unused OCAMLMKLIB variable
2fd5c5408f Makefile.tools: remove the unused DUMPOBJ and OBJINFO variables
a4d01fd716 Makefile.tools: remove the unused UNIXLIBVAR variable
ec409d3da7 Makefile.tools & co: get rid of the TOPDIR variable
e3f567c788 Only build the entire manual if it changed
1dbeaa9033 Remove the unused CTOPDIR build variable
7d892f5893 Just test the web manual
9218345d0d Merge pull request #10333 from dra27/fix-swedish-build
2fd7ef283e distclean should also clean (manual build system)
9f68013abe Plumb in and fix manual/Makefile distclean
20f5a95be1 Missing items from manual/src/Makefile clean
98734ac2cf Fix html_processing Makefile for parallel make
0705393be8 Fix parallel build
9a4c0fad9c Test building the manual in CI
f52adb3011 Fix an assertion in gc_ctrl.c that's wrong in 32-bit builds
064f231421 Fix manual build
5f90caf6e2 Generate lambda/runtimedef.ml correctly in Swedish
44f3e7ac16 Merge pull request #10322 from COCTI/strong_trail
ef296e49b2 No longer mark Windows Unicode runtime as experimental (#10318)
69a573f15d Changes in simplif.ml - removal of try_depth ref (#9827)
2226776f13 documentation: configuration switch for an odoc documentation mode (#9997)
d4dd566e3e Semantic diffings for functor types and applications (#9331)
8f40388ffd Use s_table rather than s_ref
3699d6f8a7 replace backtracking trail by a normal ref
3ef9ce800f Wrong branch name used for deepening fetch in GHA
4764325f1b Merge pull request #10320 from emillon/doc-callbackn-clarification
2126e82e7e Doc: clarify that `caml_callbackN` takes a C array
cce52acc7c separate constraint-solving (unification) part of type_pat into solve_* (#10311)
d10908cc51 Merge pull request #10317 from UnixJunkie/patch-2
470acf6b90 typos in HACKING.adoc
f0a1be6f05 Merge pull request #9407 from Anukriti12/interface_not_found
fd247ba17b added warning for missing mli interface file
bef455a872 Merge pull request #10047 from dbuenzli/unix-realpath
152ea69612 Merge pull request #1636 from oandrieu/stdlib-exn-documentation
9321e28567 Merge pull request #10232 from lpw25/unused-labels
6462df79a8 Merge pull request #10300 from sanette/triangle
eb91b328ea Fix #10298: Incorrect propagation of type equalities in functor application (#10305)
31dcf5b5bd Merge pull request #10306 from MisterDA/sock-wsa-map-error
fcc9a2bd6e Restore the --enable-spacetime option (for error)
364ffedfed Adjust changes.
ea07e45ea6 On Windows realpath strip the \\?\ prefix.
7ca6ecf155 Allow Windows realpath to work on open files.
798f6f1770 Allow Windows realpath to work on inaccessible files (like POSIX).
03a4519c8e Windows: drop the fileapi.h header. It's not needed.
21971ba839 Fix realpathing directories on Windows as suggested by @dra27.
58955bff28 Add a test.
f8feb51992 Address a first round of comments.
62b946efae Add Unix.realpath.
23660a5cfe No system defines WSAENFILE
bb1aa15488 Correct typo in WSAENAMETOOLONG
332c0a9212 Map WSA error code to Unix errno for sockopt and getsockname functions
aa28afb11e Set errno correctly for Win32 Unix.(f)truncate
59007f708c Return EBADF on error in win_filedescr_of_channel
1a2370e333 Add Changes entry
47a14b4a36 Add warning for unused labels
3a128ca0e1 Remove unused labels
f7ae40d9f8 Add tests for unused labels
76859caa15 Make the add_ note clearer
55e2cf9a82 Use @raise
63f7876e61 Adjust documentation of (^) and add to String.cat
68fa762fb2 document some exceptions raised when array/string get too large
24876b0900 typo in the doccomment for Buffer.sub
0bc918135a document some Buffer functions that can raise Invalid_argument
970797fa38 Ensure DS-form offset is a multiple of 4
406e522d92 Revert "Fix lib-string/binary.ml test on ppc64"
414bdec9ae Fix lib-string/binary.ml test on ppc64
b30a7c66b0 Stabilise the output of bigarrcml test
1a59019bb4 Merge pull request #10285 from dra27/coldstart-harder
416100442c change entry for #10295: mention reviewers
5ab5e50a82 adjust bullet size and pos
3fb3bd7fff fix for a row-arity mismatch in pattern-matching compilation (#10295)
6f0a02034c replace triangles for items by disc or diamonds
4c484b2bc1 Merge pull request #10282 from sanette/bug#10254
6e188084b2 use preg_anyspace for detecting Chapter and Part
0d4d90b159 prepare for hevea UTF sequence 2004-202F (PR#61)
98a1212de7 remove \n
4db33fed3a Merge pull request #10207 from Octachron/deprecated_single_letter_warning
89fe8c6273 typo
27eb86f206 add more white-space regexp
619d06823a Changes
2a27200a48 warning deprecation: full normalization of parsed tokens
7cb592530d compiler interface: deprecate single letter warning
c0eea1b229 Fix caml_tex warning setting
a7f80409d6 stop using single letter in warning settings
357654891e Merge pull request #9448 from dra27/missing-bytes-string
cbe61cceef Merge pull request #10221 from dra27/ba-win
694db9d5b9 Changes fix
672f445a0a make webman compatible with Hevea 2.35
6916136563 document some types in typecore.ml (#10292)
da9791ec91 Merge pull request #10288 from maranget/bowtie-for-event
236485bdbd Manual, html, avoid warning. Slight formatting change.
ea0f9f0388 Manual, html, inactive definition for latex-only command.
171bf31825 Manual, html, replace illegible symbol by \bowtie.
b00a79adb4 Preserve evaluation order in simplify_exits (#10284)
c877ef8d02 Remove $(LIBFILES) from boot/ in coldstart
f92c0a73f1 Suppress sanitizer message for known memory leak
bcffaef30f Reflect the status of the naked pointer checker in the exit code (#10171)
fc9534746b Dynamically allocate the alternate signal stack (#10266)
7a9a8ddcee Merge pull request #10247 from johnwhitington/refman-examples
2046041d5e Merge pull request #10274 from garrigue/split-Ppat_or
cb6e79c3fe manual: unicode character declarations
21e741403c indent normally
c4a03dc86c please @gscherer
8981f8d0d7 style
ddb34f0d72 Split Ppat_or case Typecore.type_pat
9feee5b8b7 Merge pull request #10270 from dra27/fix-undefined
229a94ac54 Merge pull request #10269 from shindere/enhance-manual-readme
ba1abcebea Variation on a theme of Makefile.docfiles
b2a0f4bc86 remove assertion that is not always true
db7680db28 Do not preserve fragments when compacting. Duh.
f47a498dec add assertion
861b581894 fix for #9853
dd5455fa9e manual/tests/Makefile
abd1fb3ed5 Move the undefined make variables to other-checks
85842cd8da Detect unused Makefile variables in workflow
05787308d4 manual/README.md enhancements
cb22f293e9 Define $( ) to clear unused variable warning in make
de3a7962c6 Require Makefile.common before stdlib/StdlibModules
8b8168ee09 Typecheck x|>f and f @@ x as (f x) (#10081)
8c92f979ec manual: document unary extension operator (#10263)
297fbe90aa Fix GC message when shrinking mark stack (#10264)
a477306691 Optimise Int32.unsigned_to_int on 64-bit (#10244)
685f14c695 Merge pull request #10260 from dra27/hygiene-fixes
cb0ae7b93c Use GitHub Actions outputs instead of cookies
b2a0c6d551 Merge pull request #10227 from shindere/factorize-ocamllex-ocamlyacc-build-rules
7868f7850e Merge pull request #10213 from damiendoligez/fix-best-fit
be34be3af2 Build system: deduplicate the rules used to generate the lexers and parsers
4c3c947210 Fix computation of FETCH_HEAD in GitHub Actions
6b41eac8d3 refactor initialization code for the allocation policy
9fce0f6fc7 Makefile{,.tools}: make it possible to override ocamllex
499b1b3cb7 tools/Makefile: make it possible to override ocamllex
2f2113223e ocamldoc/Makefile: Use generic rules to generate lexers and parsers
6f647a881c {debugger,lex}/Makefile: make it possible to override lexer andparser generator
fbb18d5c0a ocamltest/Makefile: make it possible to override the lexer and parser generators
8aeb57fcf0 Build system: rename the OCAMLLEX_FLAGS to OCAMLLEXFLAGS
7f937238ba Use CAML_NAME_SPACE
34606a59e2 Add Bytes.{starts,ends}_with
8574ad463e Add binary integer decoding functions to String
011be235e8 Add Bytes.split_on_char
28dc873db7 Add String.cat as dual of Bytes.cat
d63347d248 Add String.{of,to}_bytes
50392b101d Add String.empty as dual of Bytes.empty
500d8dc829 Merge pull request #10150 from dra27/one-with-log
c51af74ad8 Fix oo examples
40caa561bf Merge pull request #10255 from MisterDA/otherlibs-use-option-macros
2ea972b151 Merge pull request #10257 from MisterDA/cloexec-unimplemented-socketpair
daa944c888 Merge pull request #10256 from MisterDA/hacking-doc-remove-travis-add-gha
3b4ae00a59 Use 4.12 convenience option macros in C stubs
041ef0f70a Replace Travis with GitHub Actions in documentation
330b36670d Update reviewers
fff6a16488 Spacing
d1e2e41e59 Add forgotten cloexec parameter to un-implemented socketpair
aced66c380 Merge pull request #10133 from Octachron/with_module_types
6a25084847 update changes
1b851235ff review: merge_constraints remove recursive knot
97e3964aaf review: lift check_modtype calls
d6c0c15732 review: add a parsetree invariant
cfce291c82 review: begin...end for a then
9bac0f1e5a review: iterator extensions
dbcea3c3ee review: error message
f44262484c review: printing parsetree
cc63969644 review: rename Pwith_module_type* to Pwith_modtype*
1cf108957f Final fixes for first round of reviews
8ea2b113ef machine epsilon, missed this one earlier
649345db65 Address some of @gasche's pattern suggestions
f23e382ecf Merge pull request #1020…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants