summaryrefslogtreecommitdiffstats
path: root/testsuite
AgeCommit message (Collapse)Author
2014-05-14Use a nominal datatype for CamlinternalFormat.format6Gabriel Scherer
This should make the type-checking of formats simpler and more robust: instead of trying to find a pair as previously, we can now use the path of the format6 type directly. A nice side-effect of the change is that the internal definition of formats (as a pair) is not printed in error messages anymore. Because format6 is in fact defined in the CamlinternalFormatBasics submodule of Pervasives, and has an alias at the toplevel of Pervasives, error messages still expand the definition: > Error: This expression has type > ('a, 'b, 'c, 'd, 'd, 'a) format6 = > ('a, 'b, 'c, 'd, 'd, 'a) CamlinternalFormatBasics.format6 > but an expression was expected of type ... Passing the option `-short-paths` does avoid this expansion and returns exactly the same error message as 4.01: > Error: This expression has type ('a, 'b, 'c, 'd, 'd, 'a) format6 > but an expression was expected of type ... (To get this error message without -short-paths, one would need to define format6 directly in Pervasives; but this type is mutually recursive with several GADT types that we don't want to add in the Pervasives namespace unqualified. This is why I'll keep the alias for now.) git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14868 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-14apply patch for PR#6420: Bad error message for non-exhaustive matching on ↵Jacques Garrigue
extensible types git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14859 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12temporarily disable principality warning test in coercion.mlGabriel Scherer
Contrarily to the previous commit, this change is *not* completely benine: it corresponds to the fact that Jacques' trunk@14523 (a principality warning on formats in some situation) has not yet been replayed on the format-gadts branch -- I mainly focused on backward compatiblity. The plan is to replay this change really soon, *after* converting format6 to a nominal datatype -- this will much simplify the re-implementation of the warning in the type-checker. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14847 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12fix testsuite/tests/typing-warnings/coercions.ml.referenceGabriel Scherer
The change is benine: currently, error messages about format6 also give its definition as a product of an inner format and a string: the message changes, but the semantics is the same. Ultimately, we want the error message *not* to change (we don't want the internal implementation of formats to be exposed to the innocent user), and that will be achieved by converting format6 to a nominal type instead of a structural pair. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14846 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12fix Tests.ml{,.principal}.referenceGabriel Scherer
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14845 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12fix some testsuite MakefilesGabriel Scherer
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14844 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12For %{..%}, restore Pierre's semanticsGabriel Scherer
(printf {%foo%} bar) will print the string representation of the format type of both `foo` and `bar`, instead of printing `bar` (for this purpose one can just use %s). `bar` content is ignored, but the typer should check that its type is compatible with the one of `foo`. This semantics allows to use (printf %{..%}) for testing/debugging the use of %(...%): put in the brackets what you believe to be the format type you want to use, and as argument the format you wish to pass, and you'll get type-checking confidence and the "canonical" representation of the format string which you can use in the %(...%) -- note that using the canonical format type is not mandatory. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14840 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12testsuite Makefile fixGabriel Scherer
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14839 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12testsuite for %_[nNlL]Gabriel Scherer
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14824 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12a testsuite to measure format behavior changes and the effectiveness of ↵Gabriel Scherer
legacy mode git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14819 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12second part of Benoît Vaugon's format+gadts patchGabriel Scherer
To finish the bootstrap cycle, run: make library-cross make promote make partialclean make core make library-cross make promote-cross make partialclean make ocamlc ocamllex ocamltools make library-cross make promote make partialclean make core make compare git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14810 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-11Fix PR#6410: Error message for an attempt to use a functor as a module is ↵Jacques Garrigue
confusing git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14790 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-10fix testsuiteGabriel Scherer
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14786 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-10Reformulation of the user-facing slot-access APIGabriel Scherer
- The internal [backtrace_slot] type is not exposed anymore, instead accessors function return orthogonal information (is_raise, location). This is both more extensible and more user-friendly. - The [raw_backtrace_slot] is exposed separately as a low-level type that most users should never use. The unsafety of marshalling is documented. Instead of defining [raw_backtrace = raw_backtrace_slot array], I kept [raw_backtrace] an abstract type with [length] and [get] functions for random-access. This should allow us to change the implementation in the future to be more robust wrt. marshalling (boxing the trace in a Custom block, or even possibly the raw slots at access time). git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14784 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-10improve backtrace testsuiteGabriel Scherer
Test the behavior of the deprecated primitive [caml_get_exception_backtrace], and minimal tests for hashing/comparison of raw backtrace slots. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14782 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-09Fix PR#6405: unsound interaction of -rectypes and GADTsJacques Garrigue
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14769 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-07Fix PR#6394: Assertion failed in Typecore.expand_pathJacques Garrigue
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14757 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-05#6318: Extend match...with with exception cases. (Patch by Jeremy Yallop, ↵Alain Frisch
backend part by A. Frisch). git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14743 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-04PR#5584: merge open extensible types, extension-patch-4.0.2Jacques Garrigue
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14737 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-03Some updates for SPARCXavier Leroy
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14731 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-29merge branch "safe-string"Damien Doligez
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14705 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-29merge Leo's patch for PR#6384Jacques Garrigue
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14702 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-28Fix PR#6383: Exception Not_found when using object type in absent moduleJacques Garrigue
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14701 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-25update to use the git version of camlp5Damien Doligez
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14679 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-25Do not add absolute paths for information added toJacques Garrigue
the local environment in Env.components_of_module_make. Fixes the bug reported by Mark Shinwell on caml-devel, on 2014-04-23. This bug was related to module aliases. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14674 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-25- Constant ropagation for float and int32/int64/nativeint arithmetic.Xavier Leroy
Constant propagation for floats can be turned off with option -no-float-const-prop, for codes that change FP rounding modes at run-time. - Clambda / C-- / Mach: represent float constants as FP numbers of type float rather than literals of type string. - Tested for AMD64; other archs need testing. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14673 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-23update expected test results following commit 14660Damien Doligez
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14663 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-22Check unicity of types introduced through exceptions. Do not discard ↵Alain Frisch
exceptions from signatures if they introduce a type. git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@14662 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-22Synchronize with trunk.Alain Frisch
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@14657 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-22Consider that exceptions with a record argument create an implicit type.Alain Frisch
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@14655 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-21Fix PR#6376Jacques Garrigue
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14650 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-16Fix PR#6371Jacques Garrigue
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14608 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-14Synchronize with trunk.Alain Frisch
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@14587 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-12fix bug in test programDamien Doligez
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14583 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-12fix some of the whitespace problems in the sourceDamien Doligez
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14582 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-12remove tests that depend on camlp4Damien Doligez
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14581 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-09Produce type equation on exception rebinding with a record argument.Alain Frisch
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@14570 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-09Continue support for record argument on exceptions.Alain Frisch
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@14569 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-09Fix PR#6365Jacques Garrigue
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14565 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-08For GADT constructors, the type parameters of the original sum type cannot ↵Alain Frisch
be used for the synthesized record types. git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@14563 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-08Keep the id for the synthesized sub-declaration in Cstr_record.Alain Frisch
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@14560 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-07testsuite for primitive bound checkingGabriel Scherer
(Patch by Pierre Chambart) git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14555 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-07Reference.Alain Frisch
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record2@14551 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-04merge branch 4.01 from 4.01.0 (revision 14115) to branch closure (revision ↵Damien Doligez
14525) git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14532 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-04Get rid of 'as' clause in inline records. Support re-export of sum types ↵Alain Frisch
with inline records. git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record2@14529 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-03Fix PR#6352Jacques Garrigue
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14524 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-03comment 9644 of PR#6000: principality check for coercion to formatJacques Garrigue
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14523 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-25skip debugger test when dynlink is not availableDamien Doligez
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14490 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-21#PR6269 Optimized string matchingLuc Maranget
Noticed that I had to bootstrap to test on ARM, so I commit a new bootstrap compiler. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14479 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-20Shorten syntax for functor signatures (patch by Thomas Gazagnaire)Gabriel Scherer
``` (* Optional naming of parameter implementation *) module type X = functor (X:S) -> ... module type X = functor (_:S) -> ... (* shortening of functor module signatures *) module type F = functor (X:S) -> functor (Y:S) -> ... module type F = functor (X:S) (Y:S) -> ... ``` For consistency reasons, this commits also add shortening of functor implementations: ``` (* shortening of functor implementations *) module F = functor (X:S) -> functor (Y:S) -> ... module F = functor (X:S) (Y:S) -> ... ``` git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14474 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02