Commit Graph

20944 Commits (547f9b8126fbb558de184a3424b0fc22a3d57f27)

Author SHA1 Message Date
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
David Allsopp 0d4f1ba182 Guard caml_fatal_uncaught_exception with CAML_INTERNALS 2020-09-04 15:59:43 +01:00
David Allsopp c35dc17664 Guard heap functions with CAML_INTERNALS 2020-09-04 15:57:57 +01:00
David Allsopp b4fa324832 Explicit export caml_allocation_color 2020-09-04 15:54:52 +01:00
David Allsopp 0fce1e36ae Guard most of minor_gc.h with CAML_INTERNALS 2020-09-04 15:53:44 +01:00
David Allsopp eb6d803222 caml_gc_dispatch doesn't need exporting 2020-09-04 15:53:29 +01:00
David Allsopp ff7da588d6 Add missing caml_ prefix in minor_gc.h 2020-09-04 15:51:54 +01:00
David Allsopp bd58bcff8d Remove unimplemented functions in caml/alloc.h 2020-09-04 15:41:29 +01:00
David Allsopp bab2d10a68 Declare caml_*_ops in headers 2020-09-04 15:25:49 +01:00
Jeremy Yallop 44c053008a
Merge pull request #9066 from gasche/either
Add `('a, 'b)  Either.t = Left of 'a | Right of 'b` and `List.partition_map`
2020-09-03 22:47:55 +01:00
Gabriel Scherer de72be7c70 mention Either in the manual 2020-09-03 22:24:37 +02:00
Jeremy Yallop 1a8aa5428e Add partition_map to ListLabels. 2020-09-03 22:23:00 +02:00
Florian Angeletti ce04a5c1b1 Merge pull request #9862 from Octachron/4.11.1_with_less_daring_assertions
9859: revert 9348, inferred function types and :>
(cherry picked from commit 28b82e2e397d129840e35fb8da0b8af8b9f59633)
2020-09-03 13:55:17 +02:00
Florian Angeletti 66c368ae77 Merge pull request #9857 from lpw25/fix-poly-refs-check
Add missing `lower_contravariant` call (fixes #9856)

(cherry picked from commit 56707233fb6e33d0e5d0719b8550a15db8aa02d9)
2020-09-03 13:55:17 +02:00
Florian Angeletti a2ecfc45a3 Reorder changes, "language feature" section 2020-09-03 13:55:17 +02:00