Commit Graph

219 Commits (afcab61fbd5e8fddb2c43b6bd3bfddbcf6ed5c8d)

Author SHA1 Message Date
Thomas Refis afcab61fbd only add a dummy method when typechecking a class/class type 2018-03-06 10:01:51 +00:00
Thomas Refis 86e1c8a4e0 make the dummy method disappear when finalizing a class 2018-03-06 10:01:49 +00:00
Thomas Refis f509125318 slight representation change 2018-02-27 14:52:24 +00:00
Thomas Refis 7f0e819bde we don't need an env to take instances anymore 2018-02-27 14:52:24 +00:00
Armaël Guéneau ea00ce020f Add specific error messages in case of type propagated from a keyword 2017-12-21 11:50:54 +01:00
Armaël Guéneau 9704f790be Generalize Val_unbound with a reason 2017-11-11 15:43:31 +01:00
Jacques Garrigue 70b02405e0 Merge pull request #1365 from yallop/let-rec-patch-406
GPR#556, PR#7215, PR#7231, PR#6738: Add a new check that 'let rec' bindings are well formed.
2017-09-22 15:37:10 +09:00
alainfrisch 895a7f4443 Continue + expect test. 2017-09-12 00:35:58 +02:00
alainfrisch 338552a004 Continue adding support for ocaml.warning attribute everywhere. 2017-09-12 00:35:18 +02:00
alainfrisch e06e0f2fe9 Cleanup processing of warning/warnerror attributes. 2017-09-12 00:35:18 +02:00
Alain Frisch fd47ba9649 Support 'let open' in class and class type expressions (#1249)
* Support 'let open' in class and class type expressions.

* Adapt ocamlprof.

* Adapt ocamldoc.

* Add tests.

* Changelog.

* Manual.
2017-07-20 08:17:30 +02:00
Max Mouratov f49a3966e6 Fixed grammar in error messages 2017-04-06 14:16:18 +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
Fabrice Le Fessant a424f0aae1 Add missing locations in the parsetree (#749)
They are not propagated to the typedtree yet.
2016-08-29 16:21:38 +02:00
Damien Doligez d5a6e50ebe GPR#606: add unboxed types 2016-07-21 13:51:46 +02:00
Gabriel Scherer 201091a080 Merge pull request #570 from lijunsong/tuple2record
MPR#7237 change 12-tuples in typeclass into record.
2016-05-11 13:39:20 -04:00
Sébastien Hinderer 50147913ac Call the '#' sign hash rather than sharp. 2016-05-09 16:34:40 +02:00
lijunsong 3d4393a202 MPR#7237 change 12-tuples in typeclass into record. 2016-04-29 19:22:34 -07:00
alainfrisch 502e4f9336 More warnings when compiling the compiler. 2016-03-15 22:46:35 +01: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
Will Crichton 50dd38d4b6 Add support for immediate attribute 2016-02-02 11:45:07 +00:00
Jeremie Dimino 43111b38cd Replace uses of [Syntaxerr.ill_formed_ast] by asserts
All invariants are already checked by [Ast_invariants]
2016-01-27 18:41:12 +00:00
Nicolas Ojeda Bar c242a29b12 Compile with -principal 2016-01-14 15:29:41 +01:00
alainfrisch 7ad212045f Add module to deal with 'front-end' built-in attributes. 2015-12-02 14:46:14 +01:00
Nicolas Ojeda Bar a524920aa2 Remove Typedtree.optional
From comments in typedtree.mli:

When introduced in 2000, this [type] enabled a more efficient code
generation for optional arguments. However, today the information is
redundant as labels are passed to [transl_apply] too. Could be cleaned
up.
2015-11-25 00:37:46 +01:00
Jacques Garrigue a335b18a45 merge branches/gadt-warnings
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16532 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-23 08:33:44 +00:00
Jacques Garrigue 211888ed03 Fix PR#6907: always mark all loops...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16513 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-16 15:00:46 +00:00
Jacques Garrigue e34f40ad87 switch to 'pat -> .' and add P/Texp_unreachable
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadt-warnings@16507 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-16 00:13:40 +00:00
Jacques Garrigue a09fb037ac add refuted cases, syntax is 'pat -> _'
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadt-warnings@16500 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-15 01:55:52 +00:00
Gabriel Scherer 5882fdea22 General translation of french comments
(user 'octachron')

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16474 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-09 20:41:38 +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
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 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
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 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 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
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
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
Alain Frisch 9961e6a1c2 #6399: protocol (based on a built-in ocaml.error extension node) to let ppx tools send located errors to be reported by the compiler (patch by Peter Zotov).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14756 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-07 08:26:17 +00:00
Alain Frisch 0736512709 Revise behavior of ocaml.warning attribute: when used as a floating attribute (in a signature or structure), the scope is restricted to the current signature/structure instead of being global. Also support the new floating attributes in classes, with the same behavior.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14752 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-06 16:07:44 +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 0f1bb864df Add support for floating attributes in class structures and class signatures. (Patch by Leo White.)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14736 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-04 20:42:34 +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
Alain Frisch c8d20ade02 Do not track unused type declarations created by 'include'.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14158 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-17 14:28:31 +00:00
Alain Frisch 9a4a944363 #6182: better error message for virtual objects and class types.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14155 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-17 11:28:33 +00:00
Alain Frisch af5e566d62 Switch Typetexp.Error, Typedecl.Error, Typemod.Error, Typeclass.Error.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/exception_registration@14114 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-12 14:06:48 +00:00