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
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
Alain Frisch
0b37b27356
Stop keeping a Path.t to refer to labels and constructors in the Typedtree AST. This is not used internally and it is not a robust way to identify these objects unambiguously anyway
...
(especially when we will add more powerful disambiguation strategies). The correct way to identify an item is through the pair (type,name), which can be deduced from the
label_description/constructor_description stored in the Typedtree.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13043 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-24 12:03:00 +00:00
Alain Frisch
81b2f1770e
Make it more explicit that the label's type must be a Tconstr.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/record-disambiguation@13038 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-19 08:04:33 +00:00
Jacques Garrigue
4e5463f335
protect call to Env.find_type
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/record-disambiguation@13037 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-19 03:21:27 +00:00
Alain Frisch
01f6ba510b
Cleanup.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/record-disambiguation@13036 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-18 17:08:09 +00:00
Jacques Garrigue
70173dba45
only expand to first concrete definition
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/record-disambiguation@13035 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-18 07:35:30 +00:00
Jacques Garrigue
f55e794e82
fix label lookup
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/record-disambiguation@13034 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-18 06:20:23 +00:00
Alain Frisch
e7546ca216
PR#5768: On 'unbound identifier' errors, use spell-checking to suggest names present in the environment.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13018 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-16 13:54:24 +00:00
Damien Doligez
59371b9d75
remove TABs
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13014 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-15 18:01:26 +00:00
Damien Doligez
def31744f9
remove all $Id keywords
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13013 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-15 17:50:56 +00:00
Alain Frisch
08c3b1780a
PR#5787: Bad behavior of 'Unused ...' warnings in the toplevel.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13010 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-12 08:24:34 +00:00
Jacques Garrigue
e196c83bf3
Fix PR#5785
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13008 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-12 01:34:51 +00:00