Jacques Garrigue
65435149d2
Fix PR#6982
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16410 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-09-09 06:37:16 +00:00
Jacques Garrigue
3b0837181f
make all
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadt-warnings@16404 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-09-02 18:49:52 +00:00
Jacques Garrigue
9fb224a836
slightly more efficient redundancy check
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadt-warnings@16403 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-09-02 16:00:19 +00:00
Jacques Garrigue
e2c5a47a95
redundancy check now works / complement of exhaustiveness
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadt-warnings@16402 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-09-02 10:03:02 +00:00
Jacques Garrigue
254ab1d1b6
check for unused cases due to GADTs
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadt-warnings@16400 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-09-02 08:53:47 +00:00
Jérémie Dimino
be482e40d5
Update printing of externals with [@unboxed] or [@untagged] attributes
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16383 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-25 16:18:48 +00:00
Jérémie Dimino
1d196f4ddd
Support [@unboxed] and [@untagged] attributes
...
Adding [@unboxed] (resp [@untagged]) on a primitive argument means
that the argument must passed unboxed (resp untagged) to the external
function. Adding [@unboxed] (resp [@untagged]) on the result means
that the external function returns its result unboxed (resp untagged).
The unboxing (resp untagging) method is derived from the type.
Currently unboxing is suported for: float, int32, int64 and nativeint.
Untagging is supported for int.
This patch also increases the cm{i,o,a,x,xa} magic numbers as the type
Primitive.description is changed.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16382 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-25 16:18:46 +00:00
Xavier Leroy
bb86f5b545
Preliminary support for hexadecimal notation for FP numbers.
...
- Primitives:
caml_float_of_string extended to recognize "0x" hexa notation
caml_hexstring_of_float new primitive
We do not assume hex floats are supported by the C standard library.
Instead, conversions hex string <-> float are implemented manually.
- Printf: hex FP output supported with formats %h / %H
- Scanf: remains to be updated (see TODO in stdlib/scanf.ml)
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/hex-float@16257 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-26 09:29:33 +00:00
Damien Doligez
3e17d04ef0
PR#6931: Incorrect error message
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16235 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-22 14:04:39 +00:00
Damien Doligez
bb06fe030f
fix merge regression on nonrec
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16232 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-22 13:12:44 +00:00
Damien Doligez
860c670848
merge branch 4.02 from 4.02.1 (rev 15540) to a few fixes after 4.02.2 (rev 16205)
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16214 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-17 14:31:05 +00:00
Leo White
5c55e4cc08
Attach documentation comments to Parsetree
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16189 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-06-28 13:11:50 +00:00
Jacques Garrigue
fbcfd218f1
Fix PR#6899
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16184 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-06-23 08:40:10 +00:00
Jacques Garrigue
b650a13145
Fix PR#6897 as suggested by Alain
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16176 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-06-17 11:09:49 +00:00
Jacques Garrigue
d953f6e079
Fix PR#6886
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16152 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-06-03 22:53:25 +00:00
Gabriel Scherer
e9785253b2
PR#6876: improve warning 6 by listing the omitted labels.
...
(Eyyüb Sari)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16137 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-05-24 07:33:32 +00:00
Jacques Garrigue
f1bcf0eb6d
use or-patterns in exhaustiveness warnings when possible
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadt-warnings@16136 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-05-21 03:29:47 +00:00
Jacques Garrigue
1585a95502
Fix PR#6874 by pushing module pattern bindings together with default arguments; also merge functions in Simplif.simplify_lets.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16135 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-05-21 00:22:46 +00:00
Jacques Garrigue
c88f3d0634
Improved exhaustiveness warnings for GADTs, with non-deterministic in type_pat
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadt-warnings@16133 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-05-19 22:52:21 +00:00
Jacques Garrigue
bf2c5c3c17
Fix PR#6870
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16122 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-05-17 03:07:10 +00:00
Jacques Garrigue
6f5241de44
Fix PR#6872
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16121 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-05-17 02:36:30 +00:00
Alain Frisch
090eac18c5
Remove dead code.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16113 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-05-12 14:37:43 +00:00
Jacques Garrigue
691aabb723
Fix PR#6849 and PR#6862
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16102 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-05-09 02:17:36 +00:00
Damien Doligez
8a08ad4b4d
PR#6600 (cont.) [applying patch on behalf of garrigue]
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16079 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-05-05 15:53:37 +00:00
Gabriel Scherer
0d3d003198
GPR#168: fix bad interaction of warning 34 (unused type declaration) with "nonrec"
...
(Frédéric Bour)
Typechecking of nonrec types was still looking for uses in the temporary environment.
This made the compiler fail with "exception Not_found" when warning 34 was enabled.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16065 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-05-01 21:45:10 +00:00
Gabriel Scherer
31d5ca0d05
PR#6843: weak dependencies recorded even when .cmi missing
...
(Leo White, Gabriel Scherer)
The save_pers_struct auxiliary function is only there for code
readability: it helps makes add_import's usage more localized, as now
only *_pers_struct function use it directly.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16060 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-05-01 17:17:34 +00:00
Jacques Garrigue
721266bf30
Fix PR#6842: export Typemod.modtype_of_package
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16033 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-23 07:07:43 +00:00
Jacques Garrigue
ebbf345d29
Fix PR#5663: program rejected due to nongeneralizable type variable that appears nowhere
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16029 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-22 07:12:49 +00:00
Jacques Garrigue
3b1a33c77b
PR#6672: Unused variance specification allowed in with constraint
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16024 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-20 07:57:51 +00:00
Jacques Garrigue
00e7279141
Fix PR#6836: Assertion failure using -short-paths
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16013 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-13 07:17:22 +00:00
Damien Doligez
53d553112b
PR#6827: prefer string to bytes with -short-paths
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15987 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-07 18:49:50 +00:00
Fabrice Le Fessant
ccfec3a1dc
Add location info on Tcoerce_primitive
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15984 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-03 16:40:24 +00:00
Damien Doligez
6564974ee9
fix bug reported in https://github.com/ocaml/ocaml/pull/149
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15968 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-26 16:43:43 +00:00
Jacques Garrigue
4650c62f8b
wrong commit
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15965 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-26 02:04:22 +00:00
Jacques Garrigue
aa5422cdeb
Fix PR#5545, cleaner use of generalize_spine
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15964 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-25 23:25:52 +00:00
Jacques Garrigue
d2bed28077
Fix PR#6817
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15959 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-25 01:49:07 +00:00
Jérémie Dimino
6552e6df8d
Fix printing of nonrec types
...
By allowing Trec_next after Trec_not. Also renamed some functions with
more explicit names:
- map_rec' -> map_rec_type
- map_Rec'' -> map_rec_type_with_row_types
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15943 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-16 17:41:56 +00:00
Jérémie Dimino
321e95804c
Fix printing of sequence of type delcarations with -short-paths
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15942 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-16 17:38:38 +00:00
Jérémie Dimino
a700f40252
Update printing of nonrec types
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15924 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-13 11:09:19 +00:00
Jérémie Dimino
bcc9e6adfa
Update ocamldoc and other utilities to support "type
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15923 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-13 11:09:08 +00:00
Jérémie Dimino
65e605a7f2
Support non-recursive types
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15921 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-13 11:08:30 +00:00
Jérémie Dimino
51ba396328
Add rec_flag to type items in the parsetree and typedtree
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15918 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-13 11:07:29 +00:00
Jacques Garrigue
73756628c0
fix PR#6812
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15917 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-13 03:58:38 +00:00
Alain Frisch
11333d938c
#6583 : support for custom #... binary operators (also allowing '#' in trailing symbols, although the operator is then rejected by the type-checker).
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15892 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-09 17:39:50 +00:00
Gabriel Scherer
1ecdd68c21
untypeast: small change to avoid producing new compiler warnings.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15889 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-08 10:22:37 +00:00
Gabriel Scherer
ad85a8c1df
use open recursion in untypeast.ml
...
This allows library user to override the untyping behavior of specific
typedtree nodes.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15888 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-08 10:22:35 +00:00
Gabriel Scherer
786e69e846
move tools/untypeast.ml to typing/untypeast.ml
...
This makes them available in compiler-libs, enabling various uses
outside the compiler.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15886 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-08 10:22:32 +00:00
Gabriel Scherer
3ad7f526a2
PR#6452, GPR#140: add internal support for custom printing formats
...
(Jérémie Dimino)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15884 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-08 09:36:10 +00:00
Jacques Garrigue
22a3f9fc16
Fix PR#6787
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15851 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-02-19 09:57:41 +00:00
Jacques Garrigue
a5252548c6
Fix PR#6768: Typechecker overflow the stack on cyclic type
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15810 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-02-05 07:47:14 +00:00
Jacques Garrigue
410a8b599d
Fix PR#6752: scope escaping due to reference inside a module
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15783 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-01-17 03:58:11 +00:00
Jacques Garrigue
21bec6fb4b
Fix PR#6171: Error message confusing for the beginner when a type escapes its scope.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15782 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-01-17 03:26:54 +00:00
Jacques Garrigue
1bb0491e64
partial fix of PR#6744
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15781 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-01-17 00:44:02 +00:00
Jacques Garrigue
64ee2135de
Resolve PR#6742: remove duplicate virtual_flag information from Tstr_class
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15776 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-01-16 09:20:13 +00:00
Jacques Garrigue
838d099258
PR#6600: make -short-paths faster by building the printing map incrementally
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15775 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-01-16 02:04:17 +00:00
Alain Frisch
6f2bb2922c
Fix #6748 (bug in tast_iter, some module coercions were not rewritten).
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15773 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-01-15 11:59:18 +00:00
Alain Frisch
6e85c2d956
#6737 : also keep attribute with optional argument + default value.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15764 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-01-06 11:16:23 +00:00
Alain Frisch
8a2030cff1
#6737 : fix typedtree attributes on (fun x -> body) expressions).
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15763 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-01-06 11:02:17 +00:00
Gabriel Scherer
055d5ff07f
PR#6714: allow [@@ocaml.warning] on most structure and signature items (values, modules, module types)
...
(Peter Zotov)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15752 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-27 08:44:50 +00:00
Alain Frisch
9d450a05e0
Replace TypedtreeMap with a more standard open-recursion iterator Tast_mapper. Keep TypedtreeMap/Iter for now, for external projects.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15739 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-22 09:36:41 +00:00
Jacques Garrigue
93bae0cc3a
Exhauce PR#6611: remove the option wrapper on optional arguments in the syntax tree
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15738 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-22 09:06:02 +00:00
Jacques Garrigue
158480371a
exhauce PR#6367: introduce Asttypes.arg_label to encode labelled arguments
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15737 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-22 08:45:55 +00:00
Gabriel Scherer
f15f4f3ed8
PR6695: Make sure the compiler only uses ASCII string functions.
...
This should cover all places involving filenames in the compiler.
There are a few more paths still using Latin-1 in other ways,
e.g. in ocamldoc.
From: Peter Zotov <whitequark@whitequark.org>
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15727 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-21 11:46:14 +00:00
Gabriel Scherer
4c5c124785
PR#6466: use "extensible variant" rather than "open" types in error message
...
(Leo White)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15715 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-21 08:26:18 +00:00
Gabriel Scherer
1e411a376b
Fix constructor names in Typedast printing.
...
From: Drup <drupyog@zoho.com>
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15682 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-19 17:31:38 +00:00
Jacques Garrigue
583395b0c6
Fix PR#6726: Access to the wrong field of aliased module
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15681 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-19 07:20:00 +00:00
Jacques Garrigue
ac6c857df4
add comment for Tobject in Datarepr.free_vars
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15676 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-16 01:48:09 +00:00
Jacques Garrigue
fd2e5d7a52
Fix PR#6716: Assertion failure with existentials + inline records + rows
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15675 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-16 01:37:44 +00:00
Gabriel Scherer
f33c14b278
'Did you mean' for instance variables
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15655 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-13 14:46:29 +00:00
Gabriel Scherer
bbf039706a
'Did you mean' for unbound method names
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15654 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-13 14:46:27 +00:00
Gabriel Scherer
7a97cb4f72
typecore.ml: minor refactoring
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15653 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-13 14:46:25 +00:00
Gabriel Scherer
b6c2247a45
simplify spellchecking of labels in typecore.ml:
...
By computing the list of valid names at Wrong_name raising point, we
can remove the logic to reconstruct the set of valid names to draw
suggestion from after the fact:
- no spellchecking-related code in the NameChoice functor
- seamlessly extends to fields of inline records (were not spellchecked before)
I made the type of the "wrong name" in the Wrong_name exception more
precise, from Longident.t to string. The rationale is that:
- we only raise this exception when the longident happens to be
a (Lident str)
- the list of valid names is a list of field or variant names; those
are strings rather than idents
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15652 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-13 14:46:24 +00:00
Gabriel Scherer
3e7c17695c
'Did you mean' for variables missing on one side of an or-pattern
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15651 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-13 14:46:22 +00:00
Gabriel Scherer
843f152505
simplify the spellcheck functions
...
- expose the core spellchecking functionality in Misc rather than Typetexp
- remove the too high-order (yet insufficiently parametric)
Typetexp.spellcheck from the public interface
- rewrite the spellchecking functions for variants and fields in
Typecore from the Misc functions rather than reusing
Typetexp.spellcheck
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15650 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-13 14:46:16 +00:00
Alain Frisch
a033839139
#6688 : allow val declarations as structure items.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15645 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-10 13:37:50 +00:00
Jacques Garrigue
7a52c110b4
Fix PR#6680
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15640 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-08 08:10:55 +00:00
Jacques Garrigue
1453740778
fix PR#6690
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15637 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-08 07:51:10 +00:00
Alain Frisch
77bc51fb82
Avoid an index-out-of-bound fatal error when the primitive name is empty.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15621 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-03 09:40:27 +00:00
Gabriel Scherer
7bacc5beb4
Typedtree: add type information to primitive coercions
...
This will enable type-directed optimizations during translation of
module coercions.
WARNING: this breaks Typedtree representation, magic number will have to
be adjusted.
From: Frederic Bour <frederic.bour@lakaban.net>
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15582 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-11-17 11:55:24 +00:00
Jacques Garrigue
dcb6a4dd7e
tentative fix of PR#6651
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15576 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-11-12 11:59:23 +00:00
Jacques Garrigue
18ed39fb36
Fix PR#6650: Cty_constr not handled correctly by Subst
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15574 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-11-10 09:43:30 +00:00
Jacques Garrigue
5adbb67a45
PR#6648: show_module should indicate its elision (add Osig_ellipsis to outcometree)
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15573 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-11-10 09:09:23 +00:00
Damien Doligez
94dfb61c09
fix a bug where the .annot files were truncated because of a missing "close"
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15565 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-29 21:18:14 +00:00
Damien Doligez
031cffd155
merge branch 4.02 from release 4.02.0 to release 4.02.1
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15558 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-15 13:34:58 +00:00
Alain Frisch
e3ad818fb5
Reintegrate-merge constructors_with_record5 branch.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15556 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-14 15:51:30 +00:00
Alain Frisch
af330ed939
Cleanup.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15507 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-09 12:49:39 +00:00
Alain Frisch
fbc0356199
Cleanup.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15506 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-09 12:40:06 +00:00
Alain Frisch
50e0458bc9
Fix.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15505 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-09 12:32:47 +00:00
Alain Frisch
1abf8e25be
Better error message.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15504 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-09 12:30:32 +00:00
Alain Frisch
2a4e45404e
Text.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15503 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-09 12:28:56 +00:00
Alain Frisch
bf7fc7ddd3
Sync with trunk.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15501 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-09 12:15:18 +00:00
Alain Frisch
f66fe1d196
Move constructor and label description records to the bottom of Types. Conceptually those records don't belong to the type language, and could very well be declared e.g. in Datarepr instead.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15500 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-09 12:09:34 +00:00
Alain Frisch
5d66f846ca
Improve error message.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15494 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-07 16:08:06 +00:00
Alain Frisch
0f70276225
Reduce diff with trunk.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15493 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-07 15:56:39 +00:00
Alain Frisch
c69e6d10d2
Reduce diff with trunk.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15492 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-07 15:56:20 +00:00
Alain Frisch
7d53335538
Stop propagating manifest on inlined record types created by rebinding of extension constructors.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15491 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-07 13:57:19 +00:00
Alain Frisch
44e21907a0
Sync with trunk.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15489 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-07 10:36:14 +00:00
Alain Frisch
f87ab66c09
Simplify removal of duplicated values in signatures, reusing the same code as for structures (instead of duplicating the logic; also getting rid of a quadratic algorithm).
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15488 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-07 10:31:15 +00:00
Alain Frisch
e1eddd80ed
Disallow completely inline records on GADT constructors.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15481 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-07 07:36:21 +00:00
Alain Frisch
ad32b4dcee
Sync with trunk.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15460 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 15:59:45 +00:00
Alain Frisch
37f4743986
Factorize.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15459 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 15:59:37 +00:00
Alain Frisch
d8c418d1cc
Sync with trunk.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15457 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 15:32:08 +00:00
Alain Frisch
808d3de148
Cleanup.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15456 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 15:30:39 +00:00
Alain Frisch
0b2745ed8c
Sync with trunk.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15454 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 15:26:58 +00:00
Alain Frisch
02bfe9c1ec
Factorize.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15453 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 15:24:50 +00:00
Alain Frisch
3fbf73839d
Sync with trunk + cleanup.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15452 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 15:17:45 +00:00
Alain Frisch
7ba65eb8eb
Cleanup.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15451 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 15:16:45 +00:00
Alain Frisch
7a21fae1a7
Cleanup.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15445 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 12:26:11 +00:00
Alain Frisch
9739923fca
Cleanup.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15443 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 12:19:59 +00:00
Alain Frisch
5d0a491e56
Sync with trunk.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15442 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 12:14:17 +00:00
Alain Frisch
f7506d81df
Factorize.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15441 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 12:13:36 +00:00
Alain Frisch
79e0a4e3e6
Sync with trunk.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15440 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 12:04:10 +00:00
Alain Frisch
cb01d1c89f
Cleanup detection of duplicated type/... names.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15439 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 12:03:05 +00:00
Alain Frisch
399faa65e9
Reduce diff.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15438 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 11:57:43 +00:00
Alain Frisch
bafd443248
Reduce diff.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15437 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 11:51:53 +00:00
Alain Frisch
997ba44234
Reduce diff.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15436 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 11:49:22 +00:00
Alain Frisch
3ad9891e54
Reduce diff.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15435 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 11:48:44 +00:00
Alain Frisch
f56b5bcf1b
Sync with trunk.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15434 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 11:46:21 +00:00
Alain Frisch
64d170354c
Cleanup.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15433 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 11:45:23 +00:00
Alain Frisch
84fc597314
Reduce diff.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15432 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 11:41:56 +00:00
Alain Frisch
84fb49c665
Cleanup.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15431 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 11:38:38 +00:00
Alain Frisch
4bd0d66cac
Sync with trunk.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15430 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 11:30:59 +00:00
Alain Frisch
d5583e22fb
Cleanup.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15429 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 11:29:58 +00:00
Alain Frisch
c04726c215
Sync with trunk.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15428 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 11:17:20 +00:00
Alain Frisch
e0548c2ba2
Simplify: the inlined information does not need to be stored with type_descriptions.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15427 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 11:12:43 +00:00
Alain Frisch
c341891a95
Change the definition of type parameters for the inline record types: for non-GADT constructors, we use the same type parameters as the sum type; for GADT constructors, we support for now only the case with 0 or 1 free variables in the record, and we use this list as type parameters (ordering is canonical). Support for GADT constructors with more than one free variables can be added later when a proper syntax is added to specify the ordered list of type variables.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15426 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 09:49:32 +00:00
Alain Frisch
90662da521
Cleanup.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15425 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 09:06:07 +00:00
Alain Frisch
c767b9a299
Factorize.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15424 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 09:03:11 +00:00
Alain Frisch
c0d246224a
Integrate simple change from constructors_with_record4.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15423 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 08:58:06 +00:00
Alain Frisch
8ce82e2f63
Cleanup.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15422 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 08:51:15 +00:00
Alain Frisch
a071918419
Cleanup.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15421 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 08:50:34 +00:00
Alain Frisch
70d201c968
Cleanup.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15420 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 08:47:44 +00:00
Alain Frisch
58cede37c8
Cleanup.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15419 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 08:46:21 +00:00
Alain Frisch
f425cc7849
Factorize.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15418 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 08:38:18 +00:00
Jacques Garrigue
67f3768100
Fix PR#6593: Functor application in tests/basic-modules fails
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15413 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-02 00:43:01 +00:00
Alain Frisch
c820a813d7
Sync with trunk.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15410 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-01 14:22:05 +00:00
Alain Frisch
8feec4d2aa
The path under Tpackage doesn't refer to a type path (but to a module type path).
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15409 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-01 12:31:24 +00:00
Alain Frisch
0508ce34f8
Proper error message.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15408 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-01 10:57:01 +00:00
Alain Frisch
3e4ecd96a4
Support referencing inline record types defined by the current type definition.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15407 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-01 10:47:19 +00:00
Jacques Garrigue
e757455115
Fix PR#6465: allow incremental weakening of module aliases
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15405 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-01 09:07:14 +00:00
Alain Frisch
5afa84fdb8
Get rif of multiple exceptions with the same name in the same module.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15384 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-30 13:18:41 +00:00
Alain Frisch
d4cb9063f1
Do not resolve Tpackage path with find_type (to be checked).
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15382 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-30 13:09:34 +00:00
Alain Frisch
aa2b9cbbdb
Print inlined record type with a bang.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15381 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-30 12:43:17 +00:00
Alain Frisch
a07fa4c556
Reduce diff with trunk.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15379 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-30 12:23:11 +00:00
Alain Frisch
f7aea9bb53
Cleanup.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15378 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-30 12:17:03 +00:00
Alain Frisch
186847547f
No need to track extension path in record_representation, infer it from the result type of the label.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15377 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-30 11:10:43 +00:00
Alain Frisch
d19a43be70
Re-enable rebinding of extension constructors with inlined records.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15376 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-30 10:51:25 +00:00
Alain Frisch
5b9538aa3d
Support for inlined records in extension constructors.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15375 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-30 10:41:39 +00:00
Alain Frisch
4c378dc444
Cleanup.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15374 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-30 09:32:55 +00:00
Alain Frisch
26f6d39bb5
Cleanup.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15373 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-30 08:42:04 +00:00