Jacques Garrigue
32de864a67
improve Ambiguous_name warning
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13395 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-12 14:56:15 +00:00
Jacques Garrigue
1f5882e53d
Replace error by warning for PR#5835
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13298 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-02-19 03:12:36 +00:00
Jacques Garrigue
c76b791ca4
Add warning 42 for disambiguated labels and constructors (compatibility with old versions)
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13297 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-02-19 02:45:09 +00:00
Jacques Garrigue
dc34e6d938
add -short-paths flag for printing shorter types when using modules
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13290 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-02-09 08:42:11 +00:00
Jacques Garrigue
40ee2b4e6f
small fixes on GADT ambiguity levels
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13288 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-02-01 10:20:21 +00:00
Jacques Garrigue
26e1ff7138
Merge short-paths into a fresh branch of trunk.
...
Also fix a bit unification and subtyping errors.
You now need the flag -short-path to activate short paths.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/short-paths-4.01@13285 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-29 14:21:12 +00:00
Jacques Garrigue
4c9e622875
Fix PR#5907
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13280 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-26 01:43:11 +00:00
Jacques Garrigue
75b4dbd042
Fix PR#5906
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13276 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-25 04:26:02 +00:00
Jacques Garrigue
5348b611a7
Fix PR#5892
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13250 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-16 17:18:26 +00:00
Alain Frisch
fdaca2156b
#5877 : improve performance of repeated open statements on the same module (most useful for local opens).
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13236 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-15 12:53:31 +00:00
Jacques Garrigue
0944e97723
allow absent constructors in PM for non-exact polymorphic variant types
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13235 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-15 05:22:28 +00:00
Jacques Garrigue
c4d1bf8b77
propagate type information to patterns, even when there are polymorphic variants
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13221 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-11 07:26:23 +00:00
Alain Frisch
21f09281f3
Fix #5876 .
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13214 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-08 09:40:55 +00:00
Jacques Garrigue
50e15d0e65
fix PR#5673
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13164 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-12-27 07:03:32 +00:00
Jacques Garrigue
d779487717
fix PR#5835
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13163 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-12-27 03:15:09 +00:00
Jacques Garrigue
d573c40608
Fix PR#5865
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13161 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-12-27 02:34:49 +00:00
Alain Frisch
f1d0e5afab
Add a -dtypedtree flag to all tools (using Printtyped). Also fix ocamlnat.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13139 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-12-18 17:19:53 +00:00
Jacques Garrigue
37406cc484
fix PR#5858
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13137 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-12-18 09:58:32 +00:00
Jacques Garrigue
1430e90e89
shorten paths in annot + lookup abbreviations in persistent structures
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/short-paths@13132 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-12-17 03:18:31 +00:00
Jacques Garrigue
6a55d4f552
improve performance
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/short-paths@13124 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-12-10 10:39:26 +00:00
Jacques Garrigue
2d4cb892dd
expand to simpler types
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/short-paths@13123 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-12-10 10:39:07 +00:00
Jacques Garrigue
85bb9663e6
Improve fix of PR#5848 (allow disambiguation, only restrict scope of GADTs)
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13119 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-12-08 02:40:56 +00:00
Jacques Garrigue
b7370effb7
fix PR#5848 by disabling disambiguation for GADTs in patterns
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13117 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-12-07 02:22:18 +00:00
Jacques Garrigue
c8273a179c
merge branches/record-disambiguation
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13112 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-12-06 09:41:21 +00:00
Alain Frisch
705510eef9
Remove unused (and wrong) value declaration.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13111 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-12-04 16:25:37 +00:00
Jacques Garrigue
505dcfb2fe
fix PR#5343 (was still unsound)
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13107 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-12-02 02:46:22 +00:00
Alain Frisch
8ec89825dd
Typos.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13094 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-11-15 13:57:46 +00:00
Alain Frisch
43d30581a7
Fix #5821 : Wrong record field is reported as duplicate.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13093 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-11-14 16:59:33 +00:00
Gabriel Scherer
35160d3712
fix two minor stale locations (Location.none) in typemod.ml
...
The two bewildering "_none_" error messages fixed by this commit
could be observed in the following way:
echo "let f (x, y) = x + 1" > test.ml
touch test.mli
ocamlc -c -annot test.ml
File "_none_", line 1:
Error: Could not find the .cmi file for interface test.mli.
grep "def f" test.annot
def f "test.ml" 1 0 20 "_none_" 1 0 -1
Behavior after the fixes:
echo "let f (x, y) = x + 1" > test.ml
touch test.mli
ocamlc -c -annot test.ml
File "test.ml", line 1:
Error: Could not find the .cmi file for interface test.mli.
grep "def f" test.annot
def f "test.ml" 1 0 20 "test.ml" 1 0 -1
One could argue that for the "could not find the .cmi" error, the file
chosen could be test.mli. I find it more natural to have the name of
the file that the user asked to compile (and therefore provoked the
error). Any of those choices is better than "_none_" anyway.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13091 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-11-11 10:59:43 +00:00
Jacques Garrigue
17fc404e78
merge patch new-error.diff by lpw25
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/record-disambiguation@13090 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-11-11 03:46:59 +00:00
Alain Frisch
a3f4a6ead5
#5809 : do not store a structure item together with sub-components in partial cmt files.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13081 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-11-08 13:47:41 +00:00
Alain Frisch
e046009e4d
#5809 : do not keep both an expression and its sub-expressions in a partial .cmt file (in case of type error).
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13080 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-11-08 10:51:00 +00:00
Alain Frisch
a3d6b5879c
Simplify.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13079 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-11-08 10:41:11 +00:00
Alain Frisch
066dce8c20
#5809 : remove hash-consing of environments, replaced by a much cheaper one-slot memoization.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13078 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-11-08 10:31:58 +00:00
Alain Frisch
cf72576e97
#5814 : remove annotations from environments; to produce .annot file, use the location from the value_description record.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13076 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-11-08 09:40:21 +00:00
Jacques Garrigue
204eb64b0d
better errors + fix escaping exception
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/record-disambiguation@13075 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-11-08 09:39:23 +00:00
Alain Frisch
e2729b2715
Replace commly used format strings into simple calls to format functions, to improve performance of .annot file generation.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13072 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-11-07 10:50:14 +00:00
Alain Frisch
d4ea76d782
Even faster version.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13071 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-11-07 10:14:02 +00:00
Alain Frisch
52e9f4fe9f
Avoid format strings to generate .annot files; just switching to basic Format function gives a 25% speedup over total compilation time for 'ocamlc.opt -annot' applied to typing/typecore.ml.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13070 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-11-06 18:25:47 +00:00
Alain Frisch
86bd40310d
Attempt to fix #5805 (not tested).
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13065 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-11-06 16:36:34 +00:00
Jacques Garrigue
57c80844f5
add spellchecking for Wrong_name
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/record-disambiguation@13057 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-11-01 03:32:34 +00:00
Jacques Garrigue
94dafac93b
keep longident in Typecore.Wrong_name
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/record-disambiguation@13056 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-31 23:53:28 +00:00
Alain Frisch
4e92b813c1
Fix typo.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/record-disambiguation@13053 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-31 17:44:44 +00:00
Jacques Garrigue
c991227ab2
fix warnings
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/record-disambiguation@13052 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-31 12:36:13 +00:00
Alain Frisch
cf2551d9c6
Whitespace cleanup.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/record-disambiguation@13051 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-30 09:02:04 +00:00
Jacques Garrigue
5323da7fad
fix warnings
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/record-disambiguation@13049 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-30 01:02:08 +00:00
Jacques Garrigue
8fac736f31
clean up and merge the patch disambiguate-with-warning from PR#5759
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/record-disambiguation@13048 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-29 07:54:06 +00:00
Jacques Garrigue
9fddc2ee55
clean up
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/record-disambiguation@13046 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-24 14:42:41 +00:00
Alain Frisch
0415a557c4
In the unqualified case, allow typed-based resolution to succeed even if the label is not accessible in the toplevel environment (i.e. the module has not been opened).
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/record-disambiguation@13045 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-24 14:00:27 +00:00
Alain Frisch
90c1adb6ad
Synchronize with trunk, to benefit from simplifications made possible by r13043.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/record-disambiguation@13044 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-24 12:57:16 +00:00