Commit Graph

79 Commits (master)

Author SHA1 Message Date
Thomas Refis d52dd5c33e Add a unique id to every signature item 2020-03-05 13:34:12 +01:00
Gabriel Scherer 358c7cecd5 add separability signatures in type declarations
(this changes the .cmi format and thus requires a bootstrap,
to follow as a separate commit)

(includes bug fixes by Rodolphe Lepigre)
2020-01-28 11:39:52 +01:00
Jeremie Dimino 2d31ebfc8b Add support for [@@immediate64]
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2019-09-24 07:56:15 +01:00
Thomas Refis 2ccad26bd0 always associate a scope to a type (previously it was optional)
Previously, not having a scope meant the type was used in every context,
now we set the scope to "Btype.lowest_level" to mean the same thing.
The equivalence was made obvious by the recent changes to identifiers
scoping.
2018-10-05 10:51:26 +01:00
Thomas Refis fc210f08e4 ident: hide stamp related functions from the interface
The only remaining user was [Predef], which was bumping the counter by
999 to allow cmis to remain compatible if new predefs were defined.
This commit removes that use by making sure that every ident defined in
predef.ml is marked as predef and use a different stamp counter as user
defined idents. That way idents in cmi always start at 1, no matter how
many predefs there are.

Stamps on predef aren't strictly necessary: predefs names are unique.
However, predef idents comparison is just faster with stamps.
2018-09-21 11:47:44 -04:00
Thomas Refis b134588f28 ident: split Local into Local and Scoped
Also rename [create] into [create_scoped] and [create_var] into
[create_local].
2018-09-21 11:47:44 -04:00
Thomas Refis 67f29d1a18 ident: add an explicit scope field
- Ident.create now takes a scope as argument
- added Ident.create_var to use when the scope doesn't matter
- the current_time and the current_level are unrelated as of this
  commit. But one has to remember to bump the level when creating new
  scopes.
2018-09-21 11:47:42 -04:00
Hugo Heuzard 8043144494 Add locations to attributes
Changes

fix typo
2018-08-06 13:19:28 +01:00
Gabriel Radanne b073f825de Make Ident.t abstract and immutable. (#1704) 2018-04-09 10:19:23 +01:00
Thomas Refis f509125318 slight representation change 2018-02-27 14:52:24 +00:00
Damien Doligez cd3dbe79be add `floatarray` type and primitives to prepare for -no-flat-float-array option
NOTE: you need to bootstrap after this commit
2017-09-15 18:24:36 +02:00
Damien Doligez 10e5659edb fix discrepancy between the executables generated by
ocamlc.opt and ocamlc.byte (and between ocamlopt.opt and ocamlopt.byte)
(reported by Sebastien Hinderer)
2016-12-14 13:14:21 +00:00
Damien Doligez d5a6e50ebe GPR#606: add unboxed types 2016-07-21 13:51:46 +02:00
Damien Doligez 5401ce8473 Update headers for the new license.
Remains to be done: remove all headers in testsuite/tests.
2016-02-18 16:59:16 +01:00
Damien Doligez ee8f71101b clean up whitespace and cut long lines 2016-02-17 13:36:27 +01:00
Will Crichton 50dd38d4b6 Add support for immediate attribute 2016-02-02 11:45:07 +00:00
Mark Shinwell a76810c7ee More things in Predef 2016-01-12 15:50:27 +01:00
Jeremie Dimino 09b8c4e031 Add the predefined type extension_constructor
So that we can create constants of type [extension_constructor]
2015-11-27 17:52:33 +00:00
Alain Frisch a21eaeaa40 GPR#254: @ocaml.arg_on_literal_pattern attribute on constructors
to warn when the argument is matches against a constant pattern.
This attributes is applied on predefined exception constructors
which take an purely informational (with no stability guarantee)
message.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16502 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-15 12:30:10 +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
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
Gabriel Scherer 43647ba502 first part of Benoît Vaugon's format-gadts patch
After applying this patch, you should run:

  make library-cross
  make promote-cross
  make partialclean
  make ocamlc ocamllex ocamltools

and then immediately apply the following patches until the "second
part of Benoît Vaugon's format+gadts patch"; the bootstrap cycle is
not finished yet.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14806 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:37:29 +00:00
Jacques Garrigue b56dc4b3df PR#5584: merge open extensible types, extension-patch-4.0.2
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14737 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-04 23:08:45 +00:00
Damien Doligez 5b8df637d2 merge branch "safe-string"
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14705 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-29 11:56:17 +00:00
Alain Frisch d75e2c8b01 Support for record arguments on exceptions.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record2@14515 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-01 11:46:00 +00:00
Alain Frisch ce4c5fad1d Rvert parts of the original commit which are not relevant with the encoding approach.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record2@14513 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-31 16:17:37 +00:00
Alain Frisch 4607a0f8e1 Encode record arguments into extra record declarations.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record2@14508 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-31 12:20:22 +00:00
Alain Frisch 132ff51559 Some preparation for record arguments.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record2@14505 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-28 17:08:53 +00:00
Alain Frisch f6b9b99a44 Get rid of some uses of implicit removal of optional arguments.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14495 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-26 18:00:16 +00:00
Alain Frisch 645dcf25e5 Keep location and attributes in type, label and constructor declarations. Deprecated warning when a deprecated type or constructor is referenced.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14191 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-27 10:54:55 +00:00
Jacques Garrigue 67e18e5c4d Fix PR#5985 for constrained parameters too.
Required more variance information, so variance is now an abstract type.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13645 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-05-03 13:38:30 +00:00
Jacques Garrigue c425ae1ce8 Fix PR#5985; compute injectivity of types but no new syntax
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13634 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-30 05:26:57 +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 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 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 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 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
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 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 304dba8a0f removed Type_variant, fixed bug in GADT exhaustive check
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10734 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-10-21 04:02:02 +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 6de25fef2f first commit
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10679 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-09-13 05:28:30 +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
Xavier Leroy b6de85daad Reserve identifiers below 1000 for typing/predef.ml. This facilitates
extensions and patches like MetaOCaml.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10288 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-04-21 08:13:10 +00:00
Damien Doligez 04b1656222 clean up spaces and tabs
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9547 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-01-22 12:48:24 +00:00
Pierre Weis 59e0723455 It works: compilers and camlp4 are fully bootstrapped. The ast magic number is not yet changed.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8418 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-10-09 10:29:37 +00:00
Pierre Weis 7e2072cfb7 Type format4 is no more a predefined type.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7702 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2006-10-24 20:54:58 +00:00