Commit Graph

1102 Commits (32de864a677638739b0de024d9884df177f3ffcf)

Author SHA1 Message Date
Xavier Clerc acc19ff167 Removal of unnecessary "rec" clauses (to please warning #39).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12508 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-05-29 13:41:14 +00:00
Alain Frisch 5035a24bd0 Detect (and fix some) useless recursive flags.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12500 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-05-29 12:30:49 +00:00
Alain Frisch a0a14c08fa Enable and fix more warnings.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12498 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-05-29 11:47:28 +00:00
Alain Frisch 05c973e6ed Compile with warning 33, and remove unused opens.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12497 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-05-29 11:10:03 +00:00
Jacques Garrigue 18cb4a0c28 typo
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12492 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-05-28 21:58:42 +00:00
Jacques Garrigue c7873aa96e Improve error message (and indentation)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12491 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-05-28 21:57:08 +00:00
Alain Frisch c46da52b57 Typo.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12490 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-05-28 11:56:28 +00:00
Alain Frisch e9387ac80f #5618: include inferred type in 'not a function' and 'too many argument' error messages.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12489 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-05-28 11:54:36 +00:00
Jacques Garrigue a745e3c6fe fix PR#5619
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12482 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-05-25 05:11:55 +00:00
Jacques Garrigue a23314e0b8 Catch Not_found when calling Env.find_type + call Includemod.signatures in Toploop
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12439 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-05-08 04:26:13 +00:00
Jacques Garrigue 41f177742e disable unused warnings for identifiers defined in the toplevel
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12399 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-04-25 07:51:29 +00:00
Alain Frisch 6e7c62b0b9 #5601: Shouldn't warn about unused constructors when there is an equation.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12397 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-04-25 07:34:41 +00:00
Jacques Garrigue de7262e181 prefer newest name + only update env after printing
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/short-paths@12380 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-04-19 06:23:14 +00:00
Alain Frisch d634683a9c #5596: Do not report unused constructors within signatures.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12378 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-04-18 18:45:49 +00:00
Alain Frisch 9f46d7222a Improve message for Unused constructor/exception warnings.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12371 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-04-18 09:01:17 +00:00
Alain Frisch 8b273ea32f Typo.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12360 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-04-16 16:37:15 +00:00
Alain Frisch e20fc11742 #5594: Unused constructors are not reported if their type starts with underscore.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12358 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-04-16 16:30:06 +00:00
Alain Frisch 44cdb20670 Fix #5588.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12348 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-04-12 17:21:39 +00:00
Jacques Garrigue 1d79bec5d0 build a map from internal paths to printed paths
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/short-paths@12340 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-04-11 05:50:08 +00:00
Jacques Garrigue cb5189763f remove opened modules in type paths
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/short-paths@12310 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-04-03 03:44:30 +00:00
Jacques Garrigue 7a8e3126ba fix partial copy bug + unshare method types with -principal
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12289 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-03-28 10:39:05 +00:00
Jacques Garrigue 40e2854e21 Fix PR#5560
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12286 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-03-28 00:35:41 +00:00
Jacques Garrigue 20759f9818 Fix PR#5554 by restricting optional parameter elimination through coercions to variables and applications
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12269 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-03-25 06:41:42 +00:00
Jacques Garrigue 875aab099e revert wrong commit of experiments
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12260 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-03-23 07:17:42 +00:00
Jacques Garrigue b3e0f2e72a Fix PR#5553: do not allow a type variable to have the same name as a local type
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12257 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-03-23 02:20:24 +00:00
Alain Frisch c6e37f1573 #5551: avoid repeated lookups for missing cmi files.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12251 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-03-21 11:35:51 +00:00
Jacques Garrigue 34578cf242 shorten paths in .annot
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/short-paths@12234 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-03-14 01:19:46 +00:00
Damien Doligez 6c24f4f90b merge version 3.12 from 3.12.1 to r12205
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12210 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-03-08 19:52:03 +00:00
Alain Frisch 5f632b7b12 #5527: absolute filenames for more error messages.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12200 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-03-07 17:37:05 +00:00
Alain Frisch ab918e2078 Detect unused exception declarations (#5524).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12195 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-03-06 19:47:07 +00:00
Alain Frisch f0b95f3349 Keep locations for exception declaration. This gives better error messages and paves the way to #5524.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12193 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-03-06 19:03:17 +00:00
Damien Doligez 5b14388ad0 refactoring the "read n bytes from a channel into a new string" idiom
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12184 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-02-23 19:54:44 +00:00
Jacques Garrigue 0f85a64020 Unshare on type annotations even in non -principal mode.
Slightly slower (1% for lablgtk.cma) but better compatibility
with -principal and gadts.

By the way full -principal is a 25% slowdown for lablgtk.cma.

As a side effect of unsharing in patterns, (x : t) is now
internally converted to (_ as x : t).
This should have no impact on pattern matching compilation,
but watch out for other problems.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12153 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-02-14 10:00:18 +00:00
Jacques Garrigue eced476cce Fix PR#5498
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12111 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-02-03 05:58:57 +00:00
Jacques Garrigue f186ac5cb8 disable shortening for errors in Typetexp
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/short-paths@12076 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-01-24 05:33:50 +00:00
Jacques Garrigue 91172c1d7b disable shortening if Env.empty
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/short-paths@12075 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-01-24 01:33:47 +00:00
Jacques Garrigue 477b2dd743 propagate path-expansion environment everywhere
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/short-paths@12068 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-01-23 07:59:45 +00:00
Jacques Garrigue cca2f50948 simpler approach for signatures
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/short-paths@12067 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-01-22 06:42:56 +00:00
Jacques Garrigue 21301af8c8 shorten paths in signatures and toplevel output
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/short-paths@12066 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-01-22 05:56:11 +00:00
Jacques Garrigue 50de05d31d first attempt: handles only unification errors
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/short-paths@12065 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-01-22 03:15:14 +00:00
Jacques Garrigue 5dd1a02514 cleaner fix of PR#5490
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12063 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-01-21 03:40:37 +00:00
Alain Frisch f5da2ab926 Renaming.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12060 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-01-20 14:26:15 +00:00
Alain Frisch 094261c688 Fix #5490.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12059 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-01-20 14:24:54 +00:00
Alain Frisch 4cfd2fc2a6 Reverting bad commit.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12058 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-01-20 14:23:34 +00:00
Alain Frisch 7fe8c8ce6f Fix #5490.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12057 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-01-20 14:21:03 +00:00
Alain Frisch 1f36047e55 Direct implementation of the approximation of free identifiers + get rid of Unused_var module.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12050 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-01-18 17:41:12 +00:00
Alain Frisch c45bcb892d Synchronize with trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@12034 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-01-18 08:31:11 +00:00
Alain Frisch cdbb84ec68 New warning for unused constructors.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@12018 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-01-12 11:24:30 +00:00
Alain Frisch 59abb3cd3e #5438: fix bug reported by Boris Yakobowski; the local type name corresponding to a Path.t was not correctly computed.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@12016 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-01-12 09:16:26 +00:00
Damien Doligez b4ccb873a6 PR#5380: copy fix from 3.12 branch
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12014 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-01-11 15:22:51 +00:00
Jacques Garrigue db50558e33 fix PR#5469
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12005 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-01-10 03:01:50 +00:00
Alain Frisch 4979a58d94 Avoid problem with the use of Typeclass.unbound_class.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11998 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-01-06 14:17:56 +00:00
Alain Frisch c0e3b9cb42 Better choice of warnings.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11997 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-01-06 14:16:58 +00:00
Alain Frisch 83d48700ff Replace existing warnings 26, 27, trying to preserve their semantics.
- Warning 26 detects unused variables bound by 'let' or 'as'. In case of a or-pattern,
  a variable is considered to be an "as" variable or not according to the lhs pattern only.

- Warning 27 detects unused variables bound by 'match', 'fun', 'function', and self-variable
  in objects.

- When several values are bound by a given let pattern: if all of them are unused,
  warning 26 is trigerred; if at least one of them is used, the other unused ones
  are reported with warning 27.

This commit also introduces dedicated warnings for unused ancestor variables (objects) and
for-loop indices.




git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11976 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-29 17:49:58 +00:00
Alain Frisch 350f214671 More clever algorithm to detect unused (recursive) type declarations.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11969 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-28 14:20:53 +00:00
Alain Frisch 33eefe4874 Remove unused constructors in the AST: Cf_let, Pcf_let.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11968 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-28 13:27:07 +00:00
Jacques Garrigue 3a5aff77d0 fix PR#5449
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11964 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-28 02:22:38 +00:00
Alain Frisch 8fed6ffdfc Fix detection of unused let-bound variables in classes.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11963 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-27 10:20:21 +00:00
Alain Frisch 36c49108db Detect unused 'ancestor' identifier.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11962 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-27 09:50:40 +00:00
Alain Frisch d3e3438903 Reduce overhead for warning on unused opens when the warning is disabled.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11961 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-27 09:17:49 +00:00
Jacques Garrigue 76ac0c7cb1 fix PR#5450
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11958 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-27 08:52:45 +00:00
Jacques Garrigue efc180b48b simplify fix of PR#5445
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11957 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-27 07:12:06 +00:00
Jacques Garrigue c663cf6997 fix PR#5445
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11956 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-27 07:02:11 +00:00
Alain Frisch e84536543a The implicit type created by class and class types definitions is marked as used when the class or class type are referenced.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11941 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-22 16:04:25 +00:00
Alain Frisch 85a99d7bd4 Detected unused type declarations. A type declaration can be used (1) through an explicit reference, (2) during signature comparison, or (3) because one of the labels or fields it defines are referenced.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11940 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-22 15:42:40 +00:00
Alain Frisch 86d04b3c90 Detect unused open (#5357, #5438).
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11937 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-22 11:04:20 +00:00
Alain Frisch debacec776 Typo.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11926 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-21 16:28:04 +00:00
Alain Frisch f8a7879fb0 New warning 31 to detect a lot more unused value declarations.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11924 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-21 15:40:54 +00:00
Alain Frisch d79455bc76 New syntax for 'custom let bindings': let.simple_expr pat = expr in expr
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11906 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-21 08:58:56 +00:00
Alain Frisch cf9c1a623c Fix pretty-printing of let-like operators.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11895 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-20 11:27:06 +00:00
Alain Frisch c1f154ea70 New option to force the compilers to show absolute paths in error messages.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11890 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-20 10:35:43 +00:00
Jacques Garrigue 5b08f5b131 Fix PR#5425 and PR#5427
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11316 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-15 02:25:01 +00:00
Alain Frisch ece3353035 #5358: package types allow constraints on typed in sub-modules. Camlp4 compiles but does not support this new feature yet.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11311 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-14 10:26:15 +00:00
Jacques Garrigue 6306860e1f fix PR#5343
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11297 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-10 02:51:09 +00:00
Damien Doligez 456473d87f better reporting of wrong version for .cmi files
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11291 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-11-29 15:54:41 +00:00
Jacques Garrigue a3aad303be do not fail when injectivity not proved in Pattern mode, use mcomp
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11286 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-11-25 02:37:57 +00:00
Jacques Garrigue 6c78f42d36 merge branches/gadts-devel
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11284 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-11-24 09:02:48 +00:00
Pierre Weis 2a2fcade52 Bug #4380.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11243 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-10-25 13:13:54 +00:00
Pierre Weis a1704c30b1 Untabify.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11241 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-10-25 12:11:06 +00:00
Jacques Garrigue 3a5b3e6f9b allow breaking line for locations inside error messages
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11230 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-10-21 07:56:18 +00:00
Jacques Garrigue 8f14aadd02 Do not keep locations in .cmis!
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11229 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-10-21 03:37:50 +00:00
Jacques Garrigue b1f8048f39 merge branches/located_errors
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11228 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-10-21 03:26:35 +00:00
Jacques Garrigue efa8d8896d Shorter error messages for modules
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11225 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-10-20 05:49:38 +00:00
Jacques Garrigue ac275d142b fix gadt type variables
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11211 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-09-27 06:37:06 +00:00
Jacques Garrigue 156fff1b8a Keep type variable names
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11210 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-09-22 09:05:42 +00:00
Jacques Garrigue 7c94bbd294 fix bug in first-class module unpacking
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11173 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-08-20 02:51:34 +00:00
Jacques Garrigue bde86b194e fix PR#5332
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11170 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-08-09 13:59:41 +00:00
Jacques Garrigue 9dc661c3bf merge branches/gadts
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11160 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-07-29 10:32:43 +00:00
Jacques Garrigue 173c44001c finish fixing PR#5322
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11158 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-07-29 01:44:00 +00:00
Jacques Garrigue d89c73b659 allow using Printyp.raw_type_expr in Btype
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11157 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-07-29 01:39:09 +00:00
Damien Doligez 3b507dd1aa renaming of Objective Caml to OCaml and cleanup of copyright headers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11156 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-07-27 14:17:02 +00:00
Jacques Garrigue b7b719f6f0 fix bug reported by Polux Moon on 2011-07-26
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11151 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-07-27 08:48:22 +00:00
Damien Doligez 90664f4ea1 uniform .ignore system
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11133 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-07-20 15:37:36 +00:00
Damien Doligez c91db736b1 merge changes from 3.12.0 to 3.12.1
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11123 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-07-20 09:17:07 +00:00
Jacques Garrigue 852558d482 fix record pattern-matching; sort records in typed tree
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@11091 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-06-15 09:26:30 +00:00
Jacques Garrigue fab07a66c6 do not use unify_pat_types_gadts for normal constructors!
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@11087 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-06-14 09:41:21 +00:00
Jacques Garrigue f70dbeb1b8 fix problem with constraints outside of matching, see typing-gadts/test.ml
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@11068 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-06-05 15:00:04 +00:00
Jacques Garrigue 3e7936cc2c limit propagation of type constraints to patterns to -principal mode
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@11012 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-04-19 02:34:54 +00:00
Jacques Garrigue ea15141d8a * make -principal stricter for gadts
* may also change behaviour without -principal
* propagate type constraints in let expressions to patterns


git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@11011 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-04-19 02:13:52 +00:00
Jacques Garrigue 04968cc2e6 fix principality by expanding local definitions when exporting a value
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10979 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-03-10 06:27:24 +00:00
Jacques Garrigue 974779cd1d recover some principality
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10964 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-02-24 06:29:26 +00:00
Jacques Garrigue 3345086867 backport of fix from gadts-devel
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10924 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-01-07 07:17:38 +00:00
Jacques Garrigue e88a3e9482 allow existentials in "as" patterns + report escaping newtypes + clean-up
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10901 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-12-14 06:33:06 +00:00
Jacques Garrigue 1f26019d5e reset_pattern in partial_pred
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10898 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-12-14 02:00:20 +00:00
Jacques Garrigue 23df39a27a forgot level in partial_pred
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10897 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-12-14 01:53:15 +00:00
Jacques Garrigue 625ff1c969 make it work with omega07.ml
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10896 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-12-14 01:38:37 +00:00
Jacques Garrigue 052c8f93d1 fix some bugs found with omega07.ml
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10895 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-12-14 00:53:47 +00:00
Jacques Garrigue a845276821 In type_cases, must take instances of ty_res
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10892 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-12-13 07:35:16 +00:00
Jacques Garrigue dd5535cfe6 pattern level is only for definitions + existentials too should use pattern level
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10891 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-12-13 02:59:58 +00:00
Jacques Le Normand 89f3b70c5e newtypes now have an explicit level
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10884 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-12-03 19:52:36 +00:00
Jacques Le Normand 981758ea76 existentials can no longer appear in let bindings. This is a temporary restriction until we add gadt support to type_let
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10882 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-12-03 16:13:01 +00:00
Jacques Le Normand a630208a26 moved escaping let code
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10881 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-12-03 14:20:07 +00:00
Jacques Le Normand 986b398713 fixed escaping existentials in let bindings
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10880 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-12-03 14:06:31 +00:00
Jacques Le Normand d77b95fc56 fixed update_level bug
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10878 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-12-03 00:59:36 +00:00
Jacques Le Normand b623cdcf67 fixed duplicate error message bug
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10851 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-11-24 12:50:18 +00:00
Jacques Le Normand 5a99cea6a3 renammed a function
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10817 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-11-18 06:56:02 +00:00
Jacques Le Normand 9a97dd50c9 small cleanup
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10816 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-11-18 06:23:00 +00:00
Jacques Garrigue 800af0cf42 fix mcomp + untabify
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10813 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-11-17 09:00:58 +00:00
Jacques Le Normand 9713744542 undid changes in last commit. unify now uses the old mode when possible
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10812 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-11-17 08:14:00 +00:00
Jacques Le Normand 460226317d every function exported by ctype is now set to the correct mode
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10811 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-11-17 07:41:18 +00:00
Jacques Garrigue 8d643fc12d switch to Old in moregen too
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10807 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-11-16 06:46:34 +00:00
Jacques Le Normand 91a6a7c8b0 added change_mode function
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10806 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-11-16 06:35:29 +00:00
Jacques Le Normand 3ec9bc692b complete_constrs in parmatch.ml now works with gadts. Reverted changes to the syntax tree which are no longer needed.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10805 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-11-16 06:01:59 +00:00
Jacques Le Normand 180d03ae93 big change as to how unification mode is handled
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10804 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-11-15 09:26:28 +00:00
Jacques Le Normand ac4fa5ae13 we must forget abbrevs when switching to the old method of unification. removed unify_old: unify now decides for itself whether to use the old or the new method
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10803 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-11-15 08:02:17 +00:00
Jacques Garrigue 81b859245b fix printing bug
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10801 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-11-15 04:32:21 +00:00
Jacques Garrigue e67c5db33f move everything to type_expect
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10796 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-11-12 03:09:11 +00:00
Jacques Garrigue 73102f0fdf disable progragation in pattern-matchings containing polymorphic variants
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10791 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-11-11 10:02:56 +00:00
Jacques Garrigue e9127a1d27 fix principality
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10789 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-11-11 05:42:14 +00:00
Jacques Garrigue b0f376cd1f remove the GAHs
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10785 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-11-10 10:38:18 +00:00
Jacques Le Normand 1680403fb9 clean up
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10784 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-11-10 06:01:27 +00:00
Jacques Le Normand e5c079a709 changed formatting. lines which were more than 80 columns were reformatted in typecore.ml
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10783 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-11-09 09:29:08 +00:00
Jacques Le Normand 45c46a5032 cleaned up parmatch.ml
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10782 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-11-09 09:13:15 +00:00
Jacques Le Normand 567c7e395b cleaned up ctype
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10781 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-11-09 08:41:54 +00:00
Jacques Le Normand 62d4c44d25 cleaned up typecore.ml
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10780 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-11-09 08:21:44 +00:00
Jacques Le Normand 43a76b7b42 cleaned up typecore, made the location mandatory in type_cases
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10779 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-11-09 07:11:08 +00:00
Jacques Le Normand e494cfa4c4 small cleanup in unify
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10777 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-11-09 06:49:21 +00:00
Jacques Garrigue 1bcd80bdf9 principality
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10775 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-11-09 06:23:53 +00:00
Jacques Le Normand 4a4e69bf1b fixed bug in parmatch.ml
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10774 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-11-08 10:19:29 +00:00
Jacques Le Normand 36734b7536 cleaned up parmatch.ml
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10773 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-11-08 09:58:09 +00:00
Jacques Garrigue bf53838e2a check GADT return type
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10772 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-11-08 09:18:45 +00:00
Jacques Le Normand 1d3797436e small cleanup
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10770 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-11-08 08:54:26 +00:00
Jacques Le Normand fbecef283e fixed bug in parmatch
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10769 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-11-08 08:43:57 +00:00
Jacques Le Normand c17e2ffeda fragile check now works with gadts
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10768 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-11-08 08:11:07 +00:00
Jacques Garrigue ede1f3fcef only consider variables appearing in parameters
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10767 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-11-08 08:10:18 +00:00
Jacques Le Normand 5de2dedc1c updated parmatch.ml to new Type_variant type_kind
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10765 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-11-08 07:38:46 +00:00
Jacques Le Normand ff78b8ee75 exhaustiveness check has been _completely_ rewritten
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10764 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-11-08 07:34:09 +00:00
Jacques Garrigue f368f4e0d5 allow variance in GADTs
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10763 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-11-08 06:59:46 +00:00
Jacques Le Normand 916a46a4ad improved principal
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10760 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-11-05 04:15:22 +00:00
Jacques Le Normand 8728758793 fixed small bug in typecore
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10758 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-11-01 08:18:27 +00:00