summaryrefslogtreecommitdiff
path: root/lambda
Commit message (Collapse)AuthorAgeFilesLines
* Remove arity-interrupting elaboration of module unpacks (#12117)Nick Roberts2023-04-051-19/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add interesting first-class module typing tests Some of these tests' error messages change in this PR. Some of them failed at various points when working on this PR. * Remove elaboration of module unpacks * Remove dead code There are two pieces of now-dead code we can remove - A way of suppressing unused module warnings in `when` guards when the modules were introduced via module unpackings - A way of ensuring that first-class module unpacks are pushed under optional defaulting * Add a comment for (module _) patterns * Refactor to remove `type_unpacks` This is a refactor to avoid the need to wrap typechecking the extent of a module unpack in the `type_unpacks` function. Now you call `add_module_variables` to add the (typechecked) module bindings to the environment before calling `type_expect` on the extent; this is more similar to how we add variable bindings to the environment. * Rename `to_unpack` to `module_variable` This makes the similarity between `pattern_variable` and unpacked module variables more apparent. The code is already parallel; this change makes the names more parallel, too. * Check escape via let defs, not just bound vars Stick closer to the old behavior by checking type escape via `E1` in `let P = E1 in E2`. This patch previously just checked via the variables bound in `P`. It's closer to the old implementation to check `E1`.
* Add Misc.print_see_manual for easier printing of "see manual section X.Y.Z" ↵Stefan Muenzel2023-03-221-3/+3
| | | | (#12125)
* Stop filtering out predefined identifiers from cu_required_globalsSébastien Hinderer2023-03-171-2/+2
| | | | | | Now that it is guaranteed that the cu_required_globalbs field of compilation units does not contain any predefined symbol, it becomes possible to get rid of the code that was used to filter them out.
* Do not add predefined identifiers to the set of required globalsSébastien Hinderer2023-03-171-1/+2
| | | | This needs to be done both in lambda/translmod and in bytecomp/symtable.
* Remove `Lev_module_definition`Nick Roberts2023-03-135-35/+10
|
* Restrict local function optimisation (#11383)Vincent Laviron2023-03-131-4/+21
|
* typo fixGabriel Scherer2023-03-051-1/+1
|
* matching.ml: explain the compilation strategy for switches on constructorsGabriel Scherer2023-03-051-9/+50
|
* Merge pull request #12004 from ccasin/locally-abstract-attrsGabriel Scherer2023-02-121-1/+13
|\ | | | | Handle attributes on lambdas with locally abstract types
| * Handle attributes on lambdas with locally abstract typesChris Casinghino2023-02-101-1/+13
| |
* | Add syntax for generative functor application (#11984)Richard Eisenberg2023-02-121-12/+18
|/ | | | | | | | | | | | | | Previously, writing [F ()] was the same as writing [F (struct end)], even though the latter looks like the use of an applicative functor, not a generative one. This commit, originally written by Frédéric Bour <fred@tarides.com>, adds new syntax to our AST to represent generative functor application and propagates this change throughout the compiler. In addition, it adds a new warning, 73, to report when a user has written [F (struct end)] but should now update to [F ()]. Co-authored-by: Frédéric Bour <fred@tarides.com>
* Fix code duplication in pattern matching of polymorphic variants (#11893)Vincent Laviron2023-01-191-2/+20
|
* Optimise "include struct ... end" in more cases (#11134)Stephen Dolan2023-01-131-8/+19
|
* Ensure push_defaults can push past module patternsStephen Dolan2022-11-141-0/+2
|
* Encode extra types within pathHyunggyu Jang2022-11-111-1/+1
| | | | | | | | Reflect reviews Reflect review Pacify hygine
* Fixing typos (#11705)Fourchaux2022-11-071-5/+5
| | | * Fixing typos
* Merge pull request #11587 from lthls/poly-variant-pointer-comparisonGabriel Scherer2022-10-041-3/+8
|\ | | | | Stop using integer comparison on potential pointers
| * ReviewVincent Laviron2022-10-021-9/+8
| |
| * Stop using integer comparison on potential pointersVincent Laviron2022-09-301-2/+8
| |
* | Manual chapters on parallelism and memory model (#11280)KC Sivaramakrishnan2022-10-041-1/+1
|/ | | Add manual chapters on parallelism and memory model
* lambda/switch.ml: fix typoIkko Ashimine2022-08-241-1/+1
| | | paramter -> parameter
* Improve the location reported by parenthesized assertions (#10852)Fabian2022-07-251-6/+5
| | | | | Extend the typedtree with a location field for assertions, which is taken from the location stack of the parsetree.
* lambda/switch.ml: document some internal typesGabriel Scherer2022-07-211-5/+69
|
* lambda/switch.ml: documentation commentsGabriel Scherer2022-07-201-18/+26
|
* [refactoring] lambda/switch.ml: remove unused debug parameterGabriel Scherer2022-07-201-21/+19
|
* [refactor] lambda/switch.ml: constant namesGabriel Scherer2022-07-201-9/+9
|
* lambda/switch.ml: document the algorithmGabriel Scherer2022-07-201-11/+66
|
* minor simplification in lambda/switch.mlGabriel Scherer2022-07-191-15/+9
| | | | | | | | | | | | | | | The change fixes a small bug (that would lead to missed optimization opportunities, not miscompilation I believe) in lambda/switch.ml, where a test that should be equivalent to (len1 < 2) was in fact written in a form equivalent to (len1 <= 2), missing an improvement opportunity for the case len1=2. The use of min/max is an additional simplification in this exact same part of the code. closes #10465 Suggested by Michael Rose.
* add -safer-matching flag to disable type-based optimization of pattern-matchingJacques Garrigue2022-07-191-2/+2
|
* Fix composition of coercions with aliases (#11188)Vincent Laviron2022-06-271-7/+12
| | | | | | | * Fix composition of coercions with aliases * Changes * Add test
* Remove uses of ;; from the codebaseSébastien Hinderer2022-02-255-7/+3
|
* Ensure that build_apply respects Lambda.max_arityStephen Dolan2022-02-121-1/+2
|
* Make Lambda.lfunction privateStephen Dolan2022-02-129-118/+135
|
* Merge pull request #11000 from gasche/translattribute-fixSadiq Jaffer2022-02-101-0/+1
| | | | | | fix a minor regression from #10462 (cherry picked from commit c8c51a735d3cd4695892012f5aaab103b6a6cacf)
* Remove configuration options --disable-force-safe-string and ↵Kate2022-02-012-3/+3
| | | | | DEFAULT_STRING=unsafe (#10893) The compiler should behave as previous versions with `force-safe-string` enabled, and reject with an error any explicit setting that would try to deviate from that.
* Review: reference pull requestsVincent Laviron2022-01-161-2/+2
|
* Bring back and update comment on CamlinternalLazy.force_genVincent Laviron2022-01-161-3/+5
|
* Move opaque wrapper to compiler-generated codeVincent Laviron2022-01-161-30/+17
|
* Merge commit 'b4c5d7a55d9ec25693ba741a613d81f2c3ef66bc' into 5.00_rebase_to_prTom Kelly2021-12-211-8/+1
|\
| * Revert "Restore optim for objects directly under a top-level module"Alain Frisch2021-11-151-7/+0
| | | | | | | | This reverts commit efb4a8d5cf0bb77fb8bba41e1d76172af7f78162.
| * Restore optim for objects directly under a top-level moduleAlain Frisch2021-11-101-0/+7
| |
| * Fix #10763 (miscompilation of method delegation)Alain Frisch2021-11-101-8/+1
| |
* | Merge commit 'edf0075888ec27a50c4f50f76dba46f730797651' into 5.00_rebase_to_prTom Kelly2021-12-205-3/+84
|\ \ | |/
| * Add [@poll error] attribute (#10462)Sadiq Jaffer2021-11-095-3/+84
| |
* | Merge commit '2bcef4bc172f476217f253d24cb3311eaca504bf' into 5.00_rebase_to_prTom Kelly2021-12-208-25/+1171
|\ \ | |/
| * bow to check-typoGabriel Scherer2021-11-022-29/+42
| |
| * [minor] complete the renaming of 'TRMC' into 'TMC'Gabriel Scherer2021-11-021-1/+1
| | | | | | | | (suggestion from Konstantin Romanov)
| * [review] move the main TMC comment to tmc.mliGabriel Scherer2021-11-022-56/+55
| |
| * [review] improve code readability within TMC disambiguationGabriel Scherer2021-11-021-4/+4
| |
| * TMC: much thinking about which @tailcall annotations to preserve whereGabriel Scherer2021-11-021-16/+32
| | | | | | | | Co-Authored-By: Pierre Chambart