Commit Graph

136 Commits (a2acbc8d3bfcc3f4b1fa7136c326eb26e178c059)

Author SHA1 Message Date
Alain Frisch e58b2cd036 Continue.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13333 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-04 12:54:57 +00:00
Alain Frisch c8d3ff52a2 Cleanup + support attributes on type declarations (syntax: type t = ... with (:a1 expr1) (:a2 expr2) ... (:an exprn)).
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13332 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-01 12:44:04 +00:00
Alain Frisch 152255e512 First version with attributes and extensions on expressions, type expressions and structure items.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13330 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-02-28 16:51:59 +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
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
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 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 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
Jacques Garrigue 35185d610b merge version/4.00 at revision 12866
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/short-paths@12869 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-08-21 07:10:35 +00:00
Damien Doligez 997a678d5e clean up TABs and whitespace
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12799 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-07-30 18:04:46 +00:00
Jacques Garrigue d94c59240f Fix PR#5694 by checking that the number of parameters is identical
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12753 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-07-21 01:12:51 +00:00
Alain Frisch 76c4f6d0b8 #5629: A toplevel 'open' in the REPL does not trigger an unused open warning.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12541 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-06-01 14:05:49 +00:00
Jacques Garrigue d8f8f9ee3b keep the text width to 80 columns
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12522 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-05-31 08:07:31 +00:00
Fabrice Le Fessant d39d43e55f merge with branch bin-annot
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12516 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-05-30 14:52:37 +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 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 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
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 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
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 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 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 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 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 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 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
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
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 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 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 c2777a43d0 merged with trunk. specifically, merged with implicit unpack patch
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10742 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-10-25 08:19:48 +00:00
Jacques Garrigue ce605c042a merge branches/implicit-unpack + update camlp4
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10738 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-10-21 23:59:33 +00:00
Jacques Le Normand a1910000e3 fixed bug in syntax extension. Made unification of variants and objects local. Removed personal comments
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10724 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-10-19 05:24:36 +00:00
Jacques Le Normand ffc7d7ccec first implementation of gadt friendly pattern exhaustiveness check. It is incomplete and untested. Also, some types are now incompatible
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10707 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-10-07 07:12:50 +00:00
Jacques Le Normand a8a5d86f67 made type parameters ellidable in type declarations
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10684 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-09-21 05:30:25 +00:00
Damien Doligez 575555eecd merge changes from branching of 3.12 to release/3.12.0
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10643 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-08-02 14:37:22 +00:00
Alain Frisch baceb82d5c Keep location on type declarations.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/located_errors@10454 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-05-21 15:06:01 +00:00
Alain Frisch ccb1381991 Error narrowing for module type lookups.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10419 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-05-18 17:18:24 +00:00
Alain Frisch 5d64f0e504 Error narrowing for module lookups.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10418 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-05-18 17:14:31 +00:00
Jacques Garrigue 7312e2e22c fix order for PR#5036
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10330 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-04-30 05:12:44 +00:00
Xavier Leroy 236ffb982a PR#5036: check for nongeneralized type variables in "module type of".
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10321 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-04-28 07:53:19 +00:00
Jacques Garrigue 3810a32f6f fix PR#5037
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10320 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-04-28 04:54:57 +00:00
Jacques Garrigue 49a83dd965 merge branches/sigsubst 9626:10205
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10263 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-04-17 14:45:12 +00:00
Xavier Leroy ab550592ef Adding "module type of <module-expr>" in the class of <module-type>.
Merge of branches/moduletypeof -r 9636:10226


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10227 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-04-02 12:53:33 +00:00
Alain Frisch 89107ae6ff Merge the letopenin branch in (svn merge -r9386:9397 /svn/ocaml/branches/letopenin) and update Changes.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9406 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2009-11-01 21:52:29 +00:00
Alain Frisch 1e5b4a4857 Merge first class modules: svn merge -r 9369:9396 $caml/branches/fstclassmod.
Adapt the Changes file. Bump magic numbers. Bootstrap.



git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9397 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2009-10-26 10:53:16 +00:00
Xavier Leroy 11217e8f70 Added option -no-app-funct to turn off applicative functors
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9316 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2009-07-15 14:06:37 +00:00
Damien Doligez 1f95b17570 merge changes from 3.10.2merged to 3.11.0
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9153 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2008-12-03 18:09:09 +00:00