Commit Graph

20751 Commits (c3f6cd7ff7d53a1b97651ad59d2c0c81f98751a8)

Author SHA1 Message Date
John Whitington c3f6cd7ff7 Merge remote-tracking branch 'upstream/trunk' into trunk 2020-09-11 14:14:38 +01:00
Florian Angeletti 75ec40bdd6
Merge pull request #9590 from chetmurthy/pr-extension-constructor-rebind-pprint-4.11
PR extension constructor rebind pprint 4.11
2020-09-11 10:37:08 +02:00
David Allsopp 28789cd045
Merge pull request #9904 from dra27/unix-io-prims
Declare primitives used by unix in io.h
2020-09-11 09:35:31 +01:00
David Allsopp e7a2da1707
Merge pull request #9903 from dra27/tidy-CAMLextern
Remove final instances CAMLextern in C files
2020-09-11 09:35:07 +01:00
David Allsopp 95ea8a2d32
Merge pull request #9902 from dra27/main-cleanup
Declare caml_expand_command_line in osdeps.h
2020-09-11 09:34:47 +01:00
David Allsopp d889d8f565
Merge pull request #9901 from dra27/caml_main
Tidy caml_main declaration
2020-09-11 09:34:29 +01:00
David Allsopp ade519d5df
Merge pull request #9899 from dra27/export-in-C-only
Remove CAMLprim and CAMLexport from backtrace.h
2020-09-11 09:34:06 +01:00
John Whitington 69c59b172d Take account of GPR#9668 2020-09-10 21:01:02 +01:00
John Whitington 5a230ee8e7 Add reviewer 2020-09-10 19:33:19 +01:00
John Whitington fc101ae849 Rename tools/unlabel --> tools/sync_stdlib_docs 2020-09-10 19:17:43 +01:00
Chet Murthy 0d46b5206d redo: This little patch fixes the pretty-printing of "rebind" extension-constructors (and also rebind exceptions) so that it matches the parser. With tests. a rebind extension like
type t  += A = M.A [@a]
was pretty-printed as

type t += A[@a] = M.A
[obviously wrong, also not accepted by parser]

With tests for extension-constructors and exceptions.

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# On branch pr-extension-constructor-rebind-pprint-4.11
# Changes to be committed:
#	modified:   Changes
#	modified:   parsing/pprintast.ml
#	modified:   testsuite/tests/parsetree/source.ml
#
# Untracked files:
#	Changes.orig
#	parsing/pprintast.ml.orig
#	testsuite/tests/parsetree/source.ml.orig
#	testsuite/tests/parsetree/source.ml.rej
#
2020-09-10 11:09:06 -07:00
John Whitington 5fd8236343 Fix comment regarding NaN in Array.sort 2020-09-10 18:10:29 +01:00
John Whitington 99645f901b Adds readme to stdlib/templates 2020-09-10 18:08:00 +01:00
John Whitington d6ce828d06 Remove SINCE work from tools/unlabel 2020-09-10 17:56:42 +01:00
David Allsopp 435babd6f8 Declare primitives used by unix in io.h 2020-09-10 16:34:24 +01:00
David Allsopp 83f0dda553 Don't use CAMLextern in C files 2020-09-10 13:55:38 +01:00
David Allsopp 503776deb4 Declare caml_expand_command_line in osdeps.h 2020-09-10 12:11:02 +01:00
David Allsopp 29408deb2c Tidy caml_main declaration 2020-09-10 12:05:46 +01:00
David Allsopp 121cae4801 Remove CAMLprim and CAMLexport from backtrace.h 2020-09-10 11:01:19 +01:00
David Allsopp df64b46a7c Remove dup. declaration of caml_sys_time_unboxed 2020-09-10 09:54:43 +01:00
Florian Angeletti b0eaf5b844
Merge pull request #9591 from chetmurthy/pr-polyvariant-pprint
fix pprint of polyvariants that start with a core_type,closed, not low
2020-09-10 10:25:30 +02:00
Chet Murthy 5b8b6de2ac sorry, too-long line in Changes file
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# On branch pr-polyvariant-pprint
# Your branch is up to date with 'my-fork/pr-polyvariant-pprint'.
#
# Changes to be committed:
#	modified:   Changes
#
# Untracked files:
#	Changes.orig
#	parsing/pprintast.ml.orig
#	testsuite/tests/parsetree/source.ml.orig
#	testsuite/tests/parsetree/source.ml.rej
#
2020-09-09 15:15:22 -07:00
Chet Murthy e2ec81fe56 re-do of print polyvariants that start with a core_type,closed, not low with leading bar ("|").
a type "[ | w ]" must be printed with the "|", or it won't be
reparseable.

with tests, Changes entry.

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# On branch pr-polyvariant-pprint
# Changes to be committed:
#	modified:   Changes
#	modified:   parsing/parsetree.mli
#	modified:   parsing/pprintast.ml
#	modified:   testsuite/tests/parsetree/source.ml
#
# Untracked files:
#	Changes.orig
#	parsing/pprintast.ml.orig
#	testsuite/tests/parsetree/source.ml.orig
#	testsuite/tests/parsetree/source.ml.rej
#
2020-09-09 13:37:36 -07:00
Gabriel Scherer 03839754f4
List.equal, List.compare (#9668)
`List.equal f foo bar` is nicer than
`List.length foo = List.length bar && List.for_all2 f foo bar`.

Note: with List.compare there is a risk of users having opened the
List module, and then using 'compare' from the stdlib unqualified. For
example:

    List.(sort compare foo bar)

Such code will break (type error), and has to be fixed by using
Stdlib.compare. Stdlib is available since OCaml 4.07; people wishing
to support both 4.12 and older releases would have to avoid opening
List, or rebind 'compare' locally.
2020-09-09 20:01:04 +02:00
David Allsopp 212c0fa70c
Allow running a single test in testsuite/Makefile (#9807)
* Allow running a single test in testsuite/Makefile.  Syntax is `make one FILE=...`

* Rename `make list` into `make one LIST=...` for consistency.

* Always read actual lines from files

read should, as a general rule, always be followed by -r in scripts. If
IFS is not empty, then spaces are stripped as well.
2020-09-09 19:54:00 +02:00
Gabriel Scherer 9c5a2ef8dc
Merge pull request #9440 from progman1/genprintvalbug
#9148 extension constructor printing discrepancy in REPL
2020-09-09 17:11:02 +02:00
Gabriel Scherer aa858a35ae
Merge pull request #9889 from Octachron/pprintyp_short_path_cache
printtyp: cache short path data in wrap_env
2020-09-09 10:50:01 +02:00
David Allsopp 6dc2457036
Merge pull request #9884 from dra27/cygwin64-prereq-6
Missing declarations in io.h [Cygwin64 pre-req 6/6]
2020-09-09 09:24:34 +01:00
David Allsopp f62d519be7
Merge pull request #9882 from dra27/cygwin64-prereq-4
Tidy CAML_INTERNALS in minor_gc.h and memory.h [Cygwin64 pre-req 4/6]
2020-09-09 09:23:50 +01:00
David Allsopp 2235354bd5
The opposite of O_TEXT is not O_BINARY (#9892)
Extra modes were added in the version 7 CRT (.NET 2002).  Update `descriptor_is_in_binary_mode`  so that the original mode is correctly restored at exit, even if it is neither `O_TEXT` nor `O_BINARY`.
2020-09-08 18:17:02 +02:00
progman1 8f87147c9d toplevel: a discrepancy in extension constructors printing
fixes #9148

genprintval.tree_of_extension was missing instantiation of constructor argument types.
the Ctype.apply code is factorized out from a number of other places.
2020-09-08 18:04:09 +02:00
Florian Angeletti 9f804a25d2
Merge pull request #9427 from Octachron/ocamldoc_list_syntax
ocamldoc: fix the printing of (::)
2020-09-08 17:32:17 +02:00
Florian Angeletti 5d7663aaa5 review 2020-09-08 17:24:46 +02:00
Florian Angeletti bb186a8633 printtyp: cache old short path data in wrap_env 2020-09-08 17:22:23 +02:00
Nicolás Ojeda Bär 6db41e4816
riscv: fix register usage (#9890) 2020-09-08 09:55:19 +02:00
Xavier Leroy 1b48b5aa3c
Merge pull request #9872 from xavierleroy/seek-text-channels
Revised {in,out}_channel_length and seek_in for channels in text mode
2020-09-08 09:52:22 +02:00
Xavier Leroy 83c762974b Document the issue with pos_{in,out} and files opened in text mode
Add changes for 9872
2020-09-08 09:51:35 +02:00
David Allsopp 0c8e782688
Merge pull request #9854 from jberdine/ocamlparam
Treat set-but-empty OCAMLPARAM the same as unset
2020-09-07 14:45:26 +01:00
David Allsopp 558424dcbb
Merge pull request #9851 from yallop/obj-tag-noalloc
Mark Obj.tag [@@noalloc]
2020-09-07 14:34:04 +01:00
David Allsopp db0eb09fca
Merge pull request #9801 from dra27/ocamltest-cmp-take-729
Finally fix EOL-at-EOF and normalisation in ocamltest
2020-09-07 14:06:27 +01:00
David Allsopp 422c20013d Remove CAMLexport from Cash-exported primitives 2020-09-07 13:54:08 +01:00
David Allsopp e0397de83b
Merge pull request #9881 from dra27/cygwin64-prereq-3
Remove unimplemented functions in caml/alloc.h [Cygwin64 pre-req 3/6]
2020-09-07 13:46:07 +01:00
David Allsopp 02c1577e7b
Merge pull request #9883 from dra27/cygwin64-prereq-5
Guard caml_fatal_uncaught_exception with CAML_INTERNALS [Cygwin64 pre-req 5/6]
2020-09-07 13:38:22 +01:00
David Allsopp c4f9f51101
Merge pull request #9879 from dra27/cygwin64-prereq-1
Declare caml_*_ops in headers [Cygwin64 pre-req 1/6]
2020-09-07 13:37:50 +01:00
Xavier Leroy a7d1af4a87 Test rand.ml: make it less likely to fail
Use Random.bits() instead of Random.int 10000 to get a 2^-30 expected
failure rate instead of 10^-5.
2020-09-07 13:55:59 +02:00
octachron 1393a37509 ocamldoc: fix printing of (::) 2020-09-07 11:07:10 +02:00
珊瑚 961aaf5d1c
typo (#9886) 2020-09-06 12:12:38 +02:00
David Allsopp bf05018a1a Formalise the Cash exports 2020-09-04 16:22:10 +01:00
David Allsopp 0f6d3a3128 Add missing channel declarations in caml/io.h 2020-09-04 16:21:03 +01:00
David Allsopp 8835ed164d Don't export caml_input_scan_line 2020-09-04 16:19:06 +01:00