Commit Graph

109 Commits (8e928caea7c47e6ba8508cf2caaaa1ba9f8dca85)

Author SHA1 Message Date
Thomas Refis 8e928caea7
a better representation for modules with no name (#8908) 2019-10-09 14:15:37 +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
Leo White c19e8b2350 Refactor environment lookup functions 2019-08-15 15:56:50 +01:00
Florian Angeletti 6582335689
#8702: fix some polymorphic variant error messages (#8777)
improved error messages for fixed row polymorphic variants: keep track of the motivation behind a fixed row (e.g it was bound to an universal or existential type variable, or private) in the types themselves and use this explanation in error messages.
2019-07-12 17:47:25 +02:00
Runhang Li 97329f30ed Extend `open` to arbritrary module expressions in structures and to
applicative module paths in signatures
2018-11-26 16:20:37 +00:00
Leo White 111d4e1827 Remove positions from paths 2018-11-21 03:39:34 -05:00
Gabriel Scherer ec621bf060 add Types.Variance.eq 2018-11-18 14:56:11 +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
Armaël Guéneau 41d5658983 Re-implement the hint indicating missing "rec" keywords
This reverts commit 90fbe53ee5 except for the
Changes entry.
2018-05-06 10:08:09 +02:00
Damien Doligez 90fbe53ee5 Revert "Merge pull request #1472 from Armael/improved-error-letrec"
This reverts commit c224184471, reversing
changes made to 2fc77a2d58.

As an exception, commit 3b77d915b5 (Generalize Env.lookup_* functions to allow disabling marking) is NOT reverted, because it was used by subsequent commits.
2018-04-09 15:56:00 +02:00
Thomas Refis f509125318 slight representation change 2018-02-27 14:52:24 +00:00
Thomas Refis 3edeed67d4 add a scope field to type_expr 2018-02-27 14:52:23 +00:00
Gabriel Scherer cc539b70ff minor typo in types.mli comment 2018-01-08 11:33:53 +01:00
Luc Maranget 7f5f82dc9c
Extensible types in pattern matching. (#1459)
* Handle extensible types

* various typos

* Oups.

* Astract constructor equality that considers potential rebinding into Types.may_equal_constr

* Moved rebinbing aware pattern compatibility functions from parmatch.ml to
matching.ml. Various consequences.

* Change Changes

* change the Changes change
2017-11-21 15:11:37 +01:00
Armaël Guéneau 9f75022603 Add specific error messages for missing 'rec' in let bindings
Original design and idea by Arthur Charguéraud
2017-11-17 18:42:16 +01:00
Armaël Guéneau 9704f790be Generalize Val_unbound with a reason 2017-11-11 15:43:31 +01:00
Fourchaux 72cfdd56e9 Typos and basic grammar error fixing (#1280) 2017-08-10 11:59:23 +01:00
dwightguth 7d48407dca Partially remove polymorphic compare for constructor_tag (#406) 2017-04-28 15:31:52 +01: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
Leo White caadb9de8a Allow more module aliases in strengthening 2016-07-28 10:13:32 +01: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
Thomas Refis 0b1a6f93a8 make Types.type_expr.id immutable
Cf. https://github.com/ocaml/ocaml/pull/310#discussion_r45822414
2015-11-25 17:32:56 +00:00
Frederic Bour 9107f14afc Comment [Types] 2015-11-25 17:32:55 +00:00
Damien Doligez b860d63145 whitespace cleanup, cut long lines, add some missing headers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16415 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-09-11 11:58:31 +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
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
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 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
Damien Doligez cbfe627f92 merge changes from branch 4.02 from branching (rev 14852) to 4.02.0+rc1 (rev 15121)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15125 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-22 13:45:02 +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
Alain Frisch fa13304327 Distinguish explicitly representation of regular records and inlined records with tag = 0.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record2@14531 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-04 12:37:49 +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 663c098be6 Add location to module and module type definitions. Improves #6311.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14428 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-01-30 12:18:34 +00:00
Jacques Garrigue 3b4d7cf63b Merge module-alias branch (cf. PR#6063)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14394 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-01-10 07:53:33 +00:00
Jacques Garrigue cfa350c31a merge generative functors
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14365 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-12-17 03:52:50 +00:00
Alain Frisch 7b514efefb Typo.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14346 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-12-11 14:56:57 +00:00
Jacques Garrigue 8fb5fdc9f2 merge trunk:14244 to fix bootstrap
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/module-alias@14245 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-10-24 04:19:08 +00:00
Alain Frisch c955798936 Keep attributes with module type declarations. Warning on reference to deprecated module type.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14206 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-10-01 15:14:04 +00:00
Jacques Garrigue 5f68db9cf0 Merge trunk at revision 14200. Now everything works except private types
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/module-alias@14201 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-30 13:54:59 +00:00
Jacques Garrigue 97899f37ca Support module aliases.
Namely, you can write "module L = List" in signatures,
and avoid have the compiler use directly List when you write L.
See examples in testsuite/tests/typing-modules/aliases.ml


git-svn-id: http://caml.inria.fr/svn/ocaml/branches/module-alias@14196 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-29 07:22:34 +00:00
Alain Frisch cc31694f7c Keep attributes on module declarations.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14195 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-27 17:05:39 +00:00
Alain Frisch c0778758c1 Keep attributes/locs for class type declarations and class declarations in Types. Renaming cty -> csig prefix for class signatures to be coherent with Typedtree.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14194 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-27 15:04:03 +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
Alain Frisch 6873f39817 Keep attributes on value declarations in .cmi files (but clear all the location fields, except if -keep-locs is used, of course). Use this to report a warning when a value marked as [@@deprecated] is referenced (#5854)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14188 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-26 15:24:11 +00:00