Gabriel Scherer
f794d799ad
typing: fix the scope of extension constructor declarations
...
fixes #9970
2020-11-23 14:30:59 +01:00
Leo White
d0ddf25f3d
Merge pull request #9991 from lpw25/reproducible-no-alias-deps
...
Fix reproducibility for `-no-alias-deps`
2020-11-22 18:22:48 +00:00
Gabriel Scherer
fe026c301d
Merge pull request #10007 from AbstractMachinesLab/return-signature-when-typing
...
Expose module signature when typing implementation
2020-11-22 15:21:10 +01:00
Leo White
e7dbaeb8ce
Fix reproducibility for `-no-alias-deps`
2020-11-22 13:44:28 +00:00
Jacques Garrigue
b47c34912c
Mark datatypes as injective in recursive module approximations ( #10029 )
2020-11-20 16:29:23 +09:00
Stephen Dolan
20b7d8b2a7
Try expanding aliases in Ctype.nondep_type_rec ( #10005 )
2020-11-17 11:10:59 +00:00
Gabriel Scherer
b24f19485c
typemod: [minor] get rid of broken commented-out code
2020-11-14 18:40:57 +01:00
Gabriel Scherer
c35760d36d
typemod: refactor Signature_names.check_sig_item
...
just a refactor for concision/readability
2020-11-14 18:40:10 +01:00
Gabriel Scherer
f43b49dda6
typemod: [refactor] pass `t` to `check` rather than just one table
...
We want to implement support for groups, several declarations that
must be removed together. For this we need `check` to be able to also
mark declarations of other kinds to be removed, and this means having
access to the whole `t.bounds` value, not just a single table.
2020-11-14 18:40:10 +01:00
Leo White
4822a88248
Improve error message for aliases to the current compilation unit ( #10008 )
2020-11-08 19:06:10 +01:00
Leandro Ostera
5278e3fe37
Fix typo checks
2020-11-06 23:49:19 +01:00
Leandro Ostera
f4143fd372
Document Typedtree.implementation
2020-11-06 18:25:20 +01:00
Leandro Ostera
b91a90a4a7
Fix linting errors
2020-11-06 09:20:45 +01:00
Leandro Ostera
1b085d3840
Rename Typedtree.t to Typedtree.implementation
2020-11-05 21:19:44 +01:00
Leandro Ostera
ee2f3b428c
Move typed_impl to Typedtree.t
2020-11-05 19:06:12 +01:00
Leandro Ostera
3be9e19c17
Fix dependency between Printtyped and Typemod
2020-11-05 18:49:28 +01:00
Leandro Ostera
f6e428acf2
Introduce typed_impl record
2020-11-05 18:29:45 +01:00
Leandro Ostera
3a125b8c3c
Expose module signature when typing implementation
...
While working on a new backend for OCaml to generate Erlang sources, I
found the need to read the .cmi file back into a `Types.signature`
value.
@Drup spotted that I was reading the file and pointed out this value was
already being read during the type checking process.
A quick check at the `Typedtree.module_coercion` showed us that it would
be difficul to extract the same information that is readily available in
the signature value.
This change will expose the signature value directly, so other backends
relying on this signature information do not need to do the extra work
of reading it again.
2020-11-05 17:33:19 +01:00
Jacques Garrigue
9e181ca8f4
must use set_state rather than backtrack in Typecore.type_cases
2020-11-05 11:12:01 +09:00
Thomas Refis
10364b67d5
build_as_type: document why generic_instance can't be used ( #9983 )
2020-10-20 15:04:58 +02:00
Stephen Dolan
9b3931a156
Ensure Mtype.nondep_sig checks use the correct environment ( #9946 )
2020-10-19 10:40:25 +01:00
Thomas Refis
9fdc759ac0
Centralized tracking of frontend's global state ( #9963 )
...
import Local_store from merlin, with a simplified API following review comments
2020-10-15 14:47:19 +02:00
Florian Angeletti
5e15dd8eb5
Merge pull request #9861 from trefis/9858
...
Catch Nondep_cannot_erase
2020-10-13 16:31:34 +02:00
Nicolás Ojeda Bär
246564e8db
Remove dead code ( #9974 )
2020-10-13 09:48:16 +02:00
Thomas Refis
c7f9c8e559
pat_env: I must not tell lies
2020-10-07 15:54:23 +02:00
Leo White
952281944d
Merge pull request #9429 from lpw25/more-hash-operators
...
Add ppx-only unary operators
2020-10-06 07:46:35 +01:00
Jacques Garrigue
a5f63ba65f
Remove propagation from previous branches ( #9811 )
2020-10-03 10:48:57 +09:00
Matthew Ryan
b6b42f3ce6
Re-check Tpackage scope escapes after normalising paths ( #9715 )
...
Rewrite check_scope_escape using proper marking and unmarking
This uses the Btype.snapshot/backtrack mechanism, to ensure that we
always undo marking on types from the environment and to avoid a
`try ... with ...` construction for each recursive call.
2020-09-18 14:38:32 +02:00
Leo White
44fff5c92a
Add ppx-only unary operators
2020-09-18 10:33:16 +01:00
Leo White
bbad93d222
Merge pull request #9783 from lpw25/widen-warning-16
...
Widen warning 16 to more cases
2020-09-18 09:12:56 +01:00
Leo White
98d4f0b864
Widen warning 16 to more cases
2020-09-17 18:54:22 +01:00
Thomas Refis
f6a5b755f8
Env.folds ( #9922 )
2020-09-17 09:54:21 +02:00
Thomas Refis
9ca9df88c0
Untypeast: define untype_expression, untype_pattern ( #9920 )
...
Convenience functions that have been defined in merlin for a while.
2020-09-16 20:49:05 +02:00
Thomas Refis
92c36d54c5
correction following Florian's review
2020-09-14 13:33:24 +02:00
Thomas Refis
162df93916
catch Nondep_cannot_erase exception
2020-09-14 13:27:03 +02:00
Florian Angeletti
9a31c888b1
Merge pull request #9433 from lpw25/fix-package-constraints-for-module-aliases
...
Fix package constraints for module aliases
2020-09-11 18:21:24 +02:00
Florian Angeletti
5d7663aaa5
review
2020-09-08 17:24:46 +02:00
Florian Angeletti
bb186a8633
printtyp: cache old short path data in wrap_env
2020-09-08 17:22:23 +02:00
Florian Angeletti
ce04a5c1b1
Merge pull request #9862 from Octachron/4.11.1_with_less_daring_assertions
...
9859: revert 9348, inferred function types and :>
(cherry picked from commit 28b82e2e397d129840e35fb8da0b8af8b9f59633)
2020-09-03 13:55:17 +02:00
Florian Angeletti
66c368ae77
Merge pull request #9857 from lpw25/fix-poly-refs-check
...
Add missing `lower_contravariant` call (fixes #9856 )
(cherry picked from commit 56707233fb6e33d0e5d0719b8550a15db8aa02d9)
2020-09-03 13:55:17 +02:00
Jacques Garrigue
302d735ce8
Righteous ambivalence ( #9767 )
...
* Fix #9759 : Typing without -principal is broken in 4.11 and trunk
* compile stdlib in -principal mode
* never modify generic part of ty_expected_explained
* use generic_instance where possible
* add comment for -no-principal in stdlib__oo.cmi
2020-07-29 09:10:17 +09:00
Fourchaux
44e6cf4e0f
typos ( #9806 )
2020-07-28 12:22:03 +01:00
Hongbo Zhang
820db1bd7a
[internal refactor] minor tweaking ( #9792 )
2020-07-26 19:25:09 +02:00
Nicolás Ojeda Bär
fb76c322b4
Rename Ignored_argument => Ignored_extra_argument
2020-07-20 08:31:18 +02:00
Nicolás Ojeda Bär
958281de38
Rename Unreachable_argument => Ignored_argument
2020-07-20 08:31:18 +02:00
Nicolás Ojeda Bär
06f1a66f96
Rename Unused_subpat => Redundant_subpat
2020-07-20 08:31:18 +02:00
Nicolás Ojeda Bär
47c0e44d63
Rename Unused_case => Redundant_case
2020-07-20 08:31:18 +02:00
Nicolás Ojeda Bär
ca4b8dcbd7
Rename Non_closed_record_pattern => Missing_record_field_pattern
2020-07-20 08:31:18 +02:00
Nicolás Ojeda Bär
f3c6b16ad7
Rename Partial_application => Ignored_partial_application
2020-07-20 08:31:18 +02:00
Nicolás Ojeda Bär
14f8fa58ec
Rename Ambiguous_pattern => Ambiguous_var_in_pattern_guard
2020-07-20 08:31:18 +02:00