···11Working version
22----------------
33+34### Language features:
4556- #10437: Allow explicit binders for type variables.
···17181819### Code generation and optimizations:
19202121+- #10578: Increase the number of integer registers used for
2222+ parameter passing on PowerPC (16 registers) and on s390x (8 registers).
2323+ (Xavier Leroy, review by Mark Shinwell)
2424+2025### Standard library:
21262227* #7812, #10475: `Filename.chop_suffix name suff` now checks that `suff`
···3136- #10526: add Random.bits32, Random.bits64, Random.nativebits
3237 (Xavier Leroy, review by Gabriel Scherer and François Bobot)
33383939+* #10568: remove Obj.marshal and Obj.unmarshal
4040+ (these functions have been deprecated for a while and are superseded
4141+ by the functions from module Marshal)
4242+ (François Pottier, review by Gabriel Scherer and Kate Deplaix)
4343+4444+- #10545: Add In_channel and Out_channel modules.
4545+ (Nicolás Ojeda Bär, review by Daniel Bünzli, Simon Cruanes, Gabriel Scherer,
4646+ Guillaume Munch-Maccagnoni, Alain Frisch and Xavier Leroy)
4747+3448### Other libraries:
35493650- #10192: Add support for Unix domain sockets on Windows and use them
···5468 `OCAML_COLOR` is set, its setting takes precedence over `NO_COLOR`.
5569 (Nicolás Ojeda Bär, report by Gabriel Scherer, review by Daniel Bünzli,
5670 Gabriel Scherer and David Allsopp)
7171+7272+- #10565: Toplevel value printing: truncate strings only after 8 bytes.
7373+ (Wiktor Kuchta, review by Xavier Leroy)
7474+7575+### Debugging:
7676+7777+- #10517, #10594: when running ocamldebug on a program linked with the
7878+ threads library, don't fail immediately; instead, allow debugging
7979+ until the program creates a thread for the first time, then fail cleanly.
8080+ (Xavier Leroy, report by @anentropic, review by Gabriel Scherer)
57815882### Manual and documentation:
5983···126150127151- #10539: Field kinds should be kept when copying types
128152 Losing the sharing meant that one could desynchronize them between several
129129- occurences of self, allowing a method to be both public and hidden,
153153+ occurrences of self, allowing a method to be both public and hidden,
130154 which broke type soundness.
131155 (Jacques Garrigue, review by Leo White)
132156···582606 "interval" patterns `c1..c2`.
583607 (Guillaume Petiot, review by Gabriel Scherer and Nicolás Ojeda Bär)
584608609609+- #7449 #10458: Change the size heuristics of switch in flambda to avoid
610610+ inlining too large jump tables. (Pierre Chambart, review by Gabriel Scherer,
611611+ report by Mark Hayden)
612612+585613### Build system:
586614587615- #10289, #10406: Do not print option documentation in usage messages.
···744772745773- #10550, #10551: fix pretty-print of gadt-pattern-with-type-vars
746774 (Chet Murthy, review by Gabriel Scherer)
775775+776776+- #10584, #10856: Standard Library documentation build no longer fails if
777777+ optional libraries have been disabled.
778778+ (David Allsopp, report by Yuri Victorovich review by Florian Angeletti)
747779748780OCaml 4.12, maintenance version
749781-------------------------------
···155155let outgoing ofs = Outgoing ofs
156156let not_supported _ofs = fatal_error "Proc.loc_results: cannot call"
157157158158-let max_arguments_for_tailcalls = 8
158158+let max_arguments_for_tailcalls = 16
159159160160let loc_arguments arg =
161161- calling_conventions 0 7 100 112 outgoing arg
161161+ calling_conventions 0 15 100 112 outgoing arg
162162163163let loc_parameters arg =
164164- let (loc, _ofs) = calling_conventions 0 7 100 112 incoming arg
164164+ let (loc, _ofs) = calling_conventions 0 15 100 112 incoming arg
165165 in loc
166166167167let loc_results res =
168168- let (loc, _ofs) = calling_conventions 0 7 100 112 not_supported res
168168+ let (loc, _ofs) = calling_conventions 0 15 100 112 not_supported res
169169 in loc
170170171171(* C calling conventions for ELF32:
+4-4
asmcomp/s390x/proc.ml
···128128let outgoing ofs = Outgoing ofs
129129let not_supported _ofs = fatal_error "Proc.loc_results: cannot call"
130130131131-let max_arguments_for_tailcalls = 5
131131+let max_arguments_for_tailcalls = 8
132132133133let loc_arguments arg =
134134- calling_conventions 0 4 100 103 outgoing 0 arg
134134+ calling_conventions 0 7 100 103 outgoing 0 arg
135135let loc_parameters arg =
136136- let (loc, _ofs) = calling_conventions 0 4 100 103 incoming 0 arg in loc
136136+ let (loc, _ofs) = calling_conventions 0 7 100 103 incoming 0 arg in loc
137137let loc_results res =
138138- let (loc, _ofs) = calling_conventions 0 4 100 103 not_supported 0 res in loc
138138+ let (loc, _ofs) = calling_conventions 0 7 100 103 not_supported 0 res in loc
139139140140(* C calling conventions under SVR4:
141141 use GPR 2-6 and FPR 0,2,4,6 just like ML calling conventions.
+4
manual/src/library/stdlib-blurb.etex
···7777\end{tabular}
7878\subsubsection*{sss:stdlib-io}{input/output:}
7979\begin{tabular}{lll}
8080+"In_channel" & p.~\stdpageref{In-underscorechannel} & input channels \\
8181+"Out_channel" & p.~\stdpageref{Out-underscorechannel} & output channels \\
8082"Format" & p.~\stdpageref{Format} & pretty printing with automatic
8183indentation and line breaking \\
8284"Marshal" & p.~\stdpageref{Marshal} & marshaling of data structures \\
···130132\stddocitem{Gc}{memory management control and statistics; finalized values}
131133\stddocitem{Genlex}{a generic lexical analyzer}
132134\stddocitem{Hashtbl}{hash tables and hash functions}
135135+\stddocitem{In_channel}{input channels}
133136\stddocitem{Int}{integers}
134137\stddocitem{Int32}{32-bit integers}
135138\stddocitem{Int64}{64-bit integers}
···143146\stddocitem{Nativeint}{processor-native integers}
144147\stddocitem{Oo}{object-oriented extension}
145148\stddocitem{Option}{option values}
149149+\stddocitem{Out_channel}{output channels}
146150\stddocitem{Parsing}{the run-time library for parsers generated by \texttt{ocamlyacc}}
147151\stddocitem{Printexc}{facilities for printing exceptions}
148152\stddocitem{Printf}{formatting printing functions}
+2-2
manual/src/tutorials/gadtexamples.etex
···6868GADT type variable, this variable flows to the type of the recursive
6969function, and thus escapes its scope. In the above example, this happens
7070in the branch "App(f,x)" when "eval" is called with "f" as an argument.
7171-In this branch, the type of "f" is "($App_ 'b-> a)". The prefix "$" in
7272-"$App_ 'b" denotes an existential type named by the compiler
7171+In this branch, the type of "f" is "($App_'b -> a)". The prefix "$" in
7272+"$App_'b" denotes an existential type named by the compiler
7373(see~\ref{s:existential-names}). Since the type of "eval" is
7474"'a term -> 'a", the call "eval f" makes the existential type "$App_'b"
7575flow to the type variable "'a" and escape its scope. This triggers the
+1-1
manual/tests/check-stdlib-modules
···1010exitcode=0
1111for i in `cat $TMPDIR/stdlib-$$-modules`; do
1212 case $i in
1313- Stdlib | Camlinternal* | *Labels | Obj | Pervasives) continue;;
1313+ Stdlib | Camlinternal* | *Labels | Obj | Pervasives | In_channel | Out_channel) continue;;
1414 esac
1515 grep -q -e '"'$i'" & p\.~\\stdpageref{'$i'} &' $1/manual/src/library/stdlib-blurb.etex || {
1616 echo "Module $i is missing from the module description in library/stdlib-blurb.etex." >&2
+6-2
middle_end/flambda/inlining_cost.ml
···8989 List.iter (fun (_, lam) -> lambda_named_size lam) bindings;
9090 lambda_size body
9191 | Switch (_, sw) ->
9292- let aux = function _::_::_ -> size := !size + 5 | _ -> () in
9393- aux sw.consts; aux sw.blocks;
9292+ let cost cases =
9393+ let size = List.length cases in
9494+ if size <= 1 then 0
9595+ else 3 + size
9696+ in
9797+ size := !size + cost sw.consts + cost sw.blocks;
9498 List.iter (fun (_, lam) -> lambda_size lam) sw.consts;
9599 List.iter (fun (_, lam) -> lambda_size lam) sw.blocks;
96100 Option.iter lambda_size sw.failaction
+1
ocaml-variants.opam
···24242525opam-version: "2.0"
2626version: "4.14.0+domains"
2727+license: "LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception"
2728synopsis: "OCaml 4.14.0, with support for multicore domains (dev branch)"
2829maintainer: "kc@kcsrk.info"
2930authors: "Xavier Leroy and many contributors"
···137137 dbg_in = caml_open_descriptor_in(dbg_socket);
138138 dbg_out = caml_open_descriptor_out(dbg_socket);
139139 /* The code in this file does not bracket channel I/O operations with
140140- Lock and Unlock, so fail if those are not no-ops. */
141141- /* TODO: multicore equivalent needed here:
142142- if (caml_channel_mutex_lock != NULL ||
143143- caml_channel_mutex_unlock != NULL ||
144144- caml_channel_mutex_unlock_exn != NULL)
145145- caml_fatal_error("debugger does not support channel locks");
146146- */
140140+ Lock and Unlock, but this is safe because the debugger only works
141141+ with single-threaded programs. The program being debugged
142142+ will abort when it creates a thread. */
147143 if (!caml_debugger_in_use) caml_putword(dbg_out, -1); /* first connection */
148144#ifdef _WIN32
149145 caml_putword(dbg_out, _getpid());
···11+(**************************************************************************)
22+(* *)
33+(* OCaml *)
44+(* *)
55+(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
66+(* *)
77+(* Copyright 2021 Institut National de Recherche en Informatique et *)
88+(* en Automatique. *)
99+(* *)
1010+(* All rights reserved. This file is distributed under the terms of *)
1111+(* the GNU Lesser General Public License version 2.1, with the *)
1212+(* special exception on linking described in the file LICENSE. *)
1313+(* *)
1414+(**************************************************************************)
1515+1616+type t = in_channel
1717+1818+type open_flag = Stdlib.open_flag =
1919+ | Open_rdonly
2020+ | Open_wronly
2121+ | Open_append
2222+ | Open_creat
2323+ | Open_trunc
2424+ | Open_excl
2525+ | Open_binary
2626+ | Open_text
2727+ | Open_nonblock
2828+2929+let stdin = Stdlib.stdin
3030+let open_bin = Stdlib.open_in_bin
3131+let open_text = Stdlib.open_in
3232+let open_gen = Stdlib.open_in_gen
3333+let seek = Stdlib.LargeFile.seek_in
3434+let pos = Stdlib.LargeFile.pos_in
3535+let length = Stdlib.LargeFile.in_channel_length
3636+let close = Stdlib.close_in
3737+let close_noerr = Stdlib.close_in_noerr
3838+3939+let input_char ic =
4040+ match Stdlib.input_char ic with
4141+ | c -> Some c
4242+ | exception End_of_file -> None
4343+4444+let input_byte ic =
4545+ match Stdlib.input_byte ic with
4646+ | n -> Some n
4747+ | exception End_of_file -> None
4848+4949+let input_line ic =
5050+ match Stdlib.input_line ic with
5151+ | s -> Some s
5252+ | exception End_of_file -> None
5353+5454+let input = Stdlib.input
5555+5656+let really_input ic buf pos len =
5757+ match Stdlib.really_input ic buf pos len with
5858+ | () -> Some ()
5959+ | exception End_of_file -> None
6060+6161+let really_input_string ic len =
6262+ match Stdlib.really_input_string ic len with
6363+ | s -> Some s
6464+ | exception End_of_file -> None
6565+6666+let set_binary_mode = Stdlib.set_binary_mode_in
+136
stdlib/in_channel.mli
···11+(**************************************************************************)
22+(* *)
33+(* OCaml *)
44+(* *)
55+(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
66+(* *)
77+(* Copyright 2021 Institut National de Recherche en Informatique et *)
88+(* en Automatique. *)
99+(* *)
1010+(* All rights reserved. This file is distributed under the terms of *)
1111+(* the GNU Lesser General Public License version 2.1, with the *)
1212+(* special exception on linking described in the file LICENSE. *)
1313+(* *)
1414+(**************************************************************************)
1515+1616+(** Input channels.
1717+1818+ @since 4.14.0 *)
1919+2020+type t = in_channel
2121+(** The type of input channel. *)
2222+2323+type open_flag = Stdlib.open_flag =
2424+ | Open_rdonly (** open for reading. *)
2525+ | Open_wronly (** open for writing. *)
2626+ | Open_append (** open for appending: always write at end of file. *)
2727+ | Open_creat (** create the file if it does not exist. *)
2828+ | Open_trunc (** empty the file if it already exists. *)
2929+ | Open_excl (** fail if Open_creat and the file already exists. *)
3030+ | Open_binary (** open in binary mode (no conversion). *)
3131+ | Open_text (** open in text mode (may perform conversions). *)
3232+ | Open_nonblock (** open in non-blocking mode. *)
3333+(** Opening modes for {!open_gen}. *)
3434+3535+val stdin : t
3636+(** The standard input for the process. *)
3737+3838+val open_bin : string -> t
3939+(** Open the named file for reading, and return a new input channel on that
4040+ file, positioned at the beginning of the file. *)
4141+4242+val open_text : string -> t
4343+(** Same as {!open_bin}, but the file is opened in text mode, so that newline
4444+ translation takes place during reads. On operating systems that do not
4545+ distinguish between text mode and binary mode, this function behaves like
4646+ {!open_bin}. *)
4747+4848+val open_gen : open_flag list -> int -> string -> t
4949+(** [open_gen mode perm filename] opens the named file for reading, as described
5050+ above. The extra arguments [mode] and [perm] specify the opening mode and
5151+ file permissions. {!open_text} and {!open_bin} are special cases of this
5252+ function. *)
5353+5454+val seek : t -> int64 -> unit
5555+(** [seek chan pos] sets the current reading position to [pos] for channel
5656+ [chan]. This works only for regular files. On files of other kinds, the
5757+ behavior is unspecified. *)
5858+5959+val pos : t -> int64
6060+(** Return the current reading position for the given channel. For files opened
6161+ in text mode under Windows, the returned position is approximate (owing to
6262+ end-of-line conversion); in particular, saving the current position with
6363+ {!pos}, then going back to this position using {!seek} will not work. For
6464+ this programming idiom to work reliably and portably, the file must be
6565+ opened in binary mode. *)
6666+6767+val length : t -> int64
6868+(** Return the size (number of characters) of the regular file on which the
6969+ given channel is opened. If the channel is opened on a file that is not a
7070+ regular file, the result is meaningless. The returned size does not take
7171+ into account the end-of-line translations that can be performed when reading
7272+ from a channel opened in text mode. *)
7373+7474+val close : t -> unit
7575+(** Close the given channel. Input functions raise a [Sys_error] exception when
7676+ they are applied to a closed input channel, except {!close}, which does
7777+ nothing when applied to an already closed channel. *)
7878+7979+val close_noerr : t -> unit
8080+(** Same as {!close}, but ignore all errors. *)
8181+8282+val input_char : t -> char option
8383+(** Read one character from the given input channel. Returns [None] if there
8484+ are no more characters to read. *)
8585+8686+val input_byte : t -> int option
8787+(** Same as {!input_char}, but return the 8-bit integer representing the
8888+ character. Returns [None] if the end of file was reached. *)
8989+9090+val input_line : t -> string option
9191+(** [input_line ic] reads characters from [ic] until a newline or the end of
9292+ file is reached. Returns the string of all characters read, without the
9393+ newline (if any). Returns [None] if the end of the file has been reached.
9494+ In particular, this will be the case if the last line of input is empty.
9595+9696+ A newline is the character [\n] unless the file is open in text mode and
9797+ {!Sys.win32} is [true] in which case it is the sequence of characters
9898+ [\r\n]. *)
9999+100100+val input : t -> bytes -> int -> int -> int
101101+(** [input ic buf pos len] reads up to [len] characters from the given channel
102102+ [ic], storing them in byte sequence [buf], starting at character number
103103+ [pos]. It returns the actual number of characters read, between 0 and [len]
104104+ (inclusive). A return value of 0 means that the end of file was reached.
105105+106106+ Use {!really_input} to read exactly [len] characters.
107107+108108+ @raise Invalid_argument if [pos] and [len] do not designate a valid range of
109109+ [buf]. *)
110110+111111+val really_input : t -> bytes -> int -> int -> unit option
112112+(** [really_input ic buf pos len] reads [len] characters from channel [ic],
113113+ storing them in byte sequence [buf], starting at character number [pos].
114114+115115+ Returns [None] if the end of file is reached before [len] characters have
116116+ been read.
117117+118118+ @raise Invalid_argument if [pos] and [len] do not designate a valid range of
119119+ [buf]. *)
120120+121121+val really_input_string : t -> int -> string option
122122+(** [really_input_string ic len] reads [len] characters from channel [ic] and
123123+ returns them in a new string. Returns [None] if the end of file is reached
124124+ before [len] characters have been read. *)
125125+126126+val set_binary_mode : t -> bool -> unit
127127+(** [set_binary_mode ic true] sets the channel [ic] to binary mode: no
128128+ translations take place during input.
129129+130130+ [set_binary_mode ic false] sets the channel [ic] to text mode: depending
131131+ on the operating system, some translations may take place during input. For
132132+ instance, under Windows, end-of-lines will be translated from [\r\n] to
133133+ [\n].
134134+135135+ This function has no effect under operating systems that do not distinguish
136136+ between text mode and binary mode. *)
···127127val [@inline always] extension_id : extension_constructor -> int
128128 [@@ocaml.deprecated "use Obj.Extension_constructor.id"]
129129130130-(** The following two functions are deprecated. Use module {!Marshal}
131131- instead. *)
132132-133133-val marshal : t -> bytes
134134- [@@ocaml.deprecated "Use Marshal.to_bytes instead."]
135135-val unmarshal : bytes -> int -> t * int
136136- [@@ocaml.deprecated "Use Marshal.from_bytes and Marshal.total_size instead."]
137137-138130module Ephemeron: sig
139131 (** Ephemeron with arbitrary arity and untyped *)
140132
+47
stdlib/out_channel.ml
···11+(**************************************************************************)
22+(* *)
33+(* OCaml *)
44+(* *)
55+(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
66+(* *)
77+(* Copyright 2021 Institut National de Recherche en Informatique et *)
88+(* en Automatique. *)
99+(* *)
1010+(* All rights reserved. This file is distributed under the terms of *)
1111+(* the GNU Lesser General Public License version 2.1, with the *)
1212+(* special exception on linking described in the file LICENSE. *)
1313+(* *)
1414+(**************************************************************************)
1515+1616+type t = out_channel
1717+1818+type open_flag = Stdlib.open_flag =
1919+ | Open_rdonly
2020+ | Open_wronly
2121+ | Open_append
2222+ | Open_creat
2323+ | Open_trunc
2424+ | Open_excl
2525+ | Open_binary
2626+ | Open_text
2727+ | Open_nonblock
2828+2929+let stdout = Stdlib.stdout
3030+let stderr = Stdlib.stderr
3131+let open_bin = Stdlib.open_out_bin
3232+let open_text = Stdlib.open_out
3333+let open_gen = Stdlib.open_out_gen
3434+let seek = Stdlib.LargeFile.seek_out
3535+let pos = Stdlib.LargeFile.pos_out
3636+let length = Stdlib.LargeFile.out_channel_length
3737+let close = Stdlib.close_out
3838+let close_noerr = Stdlib.close_out_noerr
3939+let flush = Stdlib.flush
4040+let flush_all = Stdlib.flush_all
4141+let output_char = Stdlib.output_char
4242+let output_byte = Stdlib.output_byte
4343+let output_string = Stdlib.output_string
4444+let output_bytes = Stdlib.output_bytes
4545+let output = Stdlib.output
4646+let output_substring = Stdlib.output_substring
4747+let set_binary_mode = Stdlib.set_binary_mode_out
+131
stdlib/out_channel.mli
···11+(**************************************************************************)
22+(* *)
33+(* OCaml *)
44+(* *)
55+(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
66+(* *)
77+(* Copyright 2021 Institut National de Recherche en Informatique et *)
88+(* en Automatique. *)
99+(* *)
1010+(* All rights reserved. This file is distributed under the terms of *)
1111+(* the GNU Lesser General Public License version 2.1, with the *)
1212+(* special exception on linking described in the file LICENSE. *)
1313+(* *)
1414+(**************************************************************************)
1515+1616+(** Output channels.
1717+1818+ @since 4.14.0 *)
1919+2020+type t = out_channel
2121+(** The type of output channel. *)
2222+2323+type open_flag = Stdlib.open_flag =
2424+ | Open_rdonly (** open for reading. *)
2525+ | Open_wronly (** open for writing. *)
2626+ | Open_append (** open for appending: always write at end of file. *)
2727+ | Open_creat (** create the file if it does not exist. *)
2828+ | Open_trunc (** empty the file if it already exists. *)
2929+ | Open_excl (** fail if Open_creat and the file already exists. *)
3030+ | Open_binary (** open in binary mode (no conversion). *)
3131+ | Open_text (** open in text mode (may perform conversions). *)
3232+ | Open_nonblock (** open in non-blocking mode. *)
3333+(** Opening modes for {!open_gen}. *)
3434+3535+val stdout : t
3636+(** The standard output for the process. *)
3737+3838+val stderr : t
3939+(** The standard error output for the process. *)
4040+4141+val open_bin : string -> t
4242+(** Open the named file for writing, and return a new output channel on that
4343+ file, positioned at the beginning of the file. The file is truncated to zero
4444+ length if it already exists. It is created if it does not already exists. *)
4545+4646+val open_text : string -> t
4747+(** Same as {!open_bin}, but the file is opened in text mode, so that newline
4848+ translation takes place during writes. On operating systems that do not
4949+ distinguish between text mode and binary mode, this function behaves like
5050+ {!open_bin}. *)
5151+5252+val open_gen : open_flag list -> int -> string -> t
5353+(** [open_gen mode perm filename] opens the named file for writing, as described
5454+ above. The extra argument [mode] specifies the opening mode. The extra
5555+ argument [perm] specifies the file permissions, in case the file must be
5656+ created. {!open_text} and {!open_bin} are special cases of this
5757+ function. *)
5858+5959+val seek : t -> int64 -> unit
6060+(** [seek chan pos] sets the current writing position to [pos] for channel
6161+ [chan]. This works only for regular files. On files of other kinds (such as
6262+ terminals, pipes and sockets), the behavior is unspecified. *)
6363+6464+val pos : t -> int64
6565+(** Return the current writing position for the given channel. Does not work on
6666+ channels opened with the [Open_append] flag (returns unspecified results).
6767+6868+ For files opened in text mode under Windows, the returned position is
6969+ approximate (owing to end-of-line conversion); in particular, saving the
7070+ current position with {!pos}, then going back to this position using {!seek}
7171+ will not work. For this programming idiom to work reliably and portably,
7272+ the file must be opened in binary mode. *)
7373+7474+val length : t -> int64
7575+(** Return the size (number of characters) of the regular file on which the
7676+ given channel is opened. If the channel is opened on a file that is not a
7777+ regular file, the result is meaningless. *)
7878+7979+val close : t -> unit
8080+(** Close the given channel, flushing all buffered write operations. Output
8181+ functions raise a [Sys_error] exception when they are applied to a closed
8282+ output channel, except {!close} and {!flush}, which do nothing when applied
8383+ to an already closed channel. Note that {!close} may raise [Sys_error] if
8484+ the operating system signals an error when flushing or closing. *)
8585+8686+val close_noerr : t -> unit
8787+(** Same as {!close}, but ignore all errors. *)
8888+8989+val flush : t -> unit
9090+(** Flush the buffer associated with the given output channel, performing all
9191+ pending writes on that channel. Interactive programs must be careful about
9292+ flushing standard output and standard error at the right time. *)
9393+9494+val flush_all : unit -> unit
9595+(** Flush all open output channels; ignore errors. *)
9696+9797+val output_char : t -> char -> unit
9898+(** Write the character on the given output channel. *)
9999+100100+val output_byte : t -> int -> unit
101101+(** Write one 8-bit integer (as the single character with that code) on the
102102+ given output channel. The given integer is taken modulo 256. *)
103103+104104+val output_string : t -> string -> unit
105105+(** Write the string on the given output channel. *)
106106+107107+val output_bytes : t -> bytes -> unit
108108+(** Write the byte sequence on the given output channel. *)
109109+110110+val output : t -> bytes -> int -> int -> unit
111111+(** [output oc buf pos len] writes [len] characters from byte sequence [buf],
112112+ starting at offset [pos], to the given output channel [oc].
113113+114114+ @raise Invalid_argument if [pos] and [len] do not designate a valid range of
115115+ [buf]. *)
116116+117117+val output_substring : t -> string -> int -> int -> unit
118118+(** Same as {!output} but take a string as argument instead of a byte
119119+ sequence. *)
120120+121121+val set_binary_mode : t -> bool -> unit
122122+(** [set_binary_mode oc true] sets the channel [oc] to binary mode: no
123123+ translations take place during output.
124124+125125+ [set_binary_mode oc false] sets the channel [oc] to text mode: depending on
126126+ the operating system, some translations may take place during output. For
127127+ instance, under Windows, end-of-lines will be translated from [\n] to
128128+ [\r\n].
129129+130130+ This function has no effect under operating systems that do not distinguish
131131+ between text mode and binary mode. *)
···11281128val input_byte : in_channel -> int
11291129(** Same as {!Stdlib.input_char}, but return the 8-bit integer representing
11301130 the character.
11311131- @raise End_of_file if an end of file was reached. *)
11311131+ @raise End_of_file if the end of file was reached. *)
1132113211331133val input_binary_int : in_channel -> int
11341134(** Read an integer encoded in binary format (4 bytes, big-endian)
11351135 from the given input channel. See {!Stdlib.output_binary_int}.
11361136- @raise End_of_file if an end of file was reached while reading the
11361136+ @raise End_of_file if the end of file was reached while reading the
11371137 integer. *)
1138113811391139val input_value : in_channel -> 'a
···14031403module Genlex = Genlex
14041404[@@deprecated "Use the camlp-streams library instead."]
14051405module Hashtbl = Hashtbl
14061406+module In_channel = In_channel
14061407module Int = Int
14071408module Int32 = Int32
14081409module Int64 = Int64
···14181419module Obj = Obj
14191420module Oo = Oo
14201421module Option = Option
14221422+module Out_channel = Out_channel
14211423module Parsing = Parsing
14221424module Pervasives = Pervasives
14231425[@@deprecated "Use Stdlib instead.\n\
+1-1
testsuite/tests/asmcomp/polling_insertion.ml
···142142 allocating_func_match minors_before
143143144144(* This function tests that polls are not added to the back edge of
145145- where loop bodies allocat unconditionally *)
145145+ where loop bodies allocate unconditionally *)
146146let polls_not_added_to_allocating_loops () =
147147 let current_minors = ref (minor_gcs ()) in
148148 request_minor_gc ();
···103103Line 1, characters 15-41:
1041041 | include struct open struct type t = T end let x = T end
105105 ^^^^^^^^^^^^^^^^^^^^^^^^^^
106106-Error: The type t/154 introduced by this open appears in the signature
106106+Error: The type t/156 introduced by this open appears in the signature
107107 Line 1, characters 46-47:
108108- The value x has no valid type if t/154 is hidden
108108+ The value x has no valid type if t/156 is hidden
109109|}];;
110110111111module A = struct
···1231234 | type t = T
1241245 | let x = T
1251256 | end
126126-Error: The type t/159 introduced by this open appears in the signature
126126+Error: The type t/161 introduced by this open appears in the signature
127127 Line 7, characters 8-9:
128128- The value y has no valid type if t/159 is hidden
128128+ The value y has no valid type if t/161 is hidden
129129|}];;
130130131131module A = struct
···1421423 | ....open struct
1431434 | type t = T
1441445 | end
145145-Error: The type t/164 introduced by this open appears in the signature
145145+Error: The type t/166 introduced by this open appears in the signature
146146 Line 6, characters 8-9:
147147- The value y has no valid type if t/164 is hidden
147147+ The value y has no valid type if t/166 is hidden
148148|}]
149149150150(* It was decided to not allow this anymore. *)
+3-3
testsuite/tests/typing-sigsubst/sigsubst.ml
···2424Line 3, characters 2-36:
25253 | include Comparable with type t = t
2626 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2727-Error: Illegal shadowing of included type t/102 by t/106
2727+Error: Illegal shadowing of included type t/104 by t/108
2828 Line 2, characters 2-19:
2929- Type t/102 came from this include
2929+ Type t/104 came from this include
3030 Line 3, characters 2-23:
3131- The value print has no valid type if t/102 is shadowed
3131+ The value print has no valid type if t/104 is shadowed
3232|}]
33333434module type Sunderscore = sig
+1-1
typing/includecore.ml
···105105 | Tconstr(Pident _, _, _) ->
106106 (* This function is checking for an abstract row on the side that is being
107107 included into (usually numbered with "2" in this file). In this case,
108108- the abstract row variable has been subsituted for an object or variant
108108+ the abstract row variable has been substituted for an object or variant
109109 type. *)
110110 begin match get_desc (Ctype.expand_head env ty) with
111111 | Tobject _|Tvariant _ -> true
+1
typing/oprint.ml
···188188 | Oval_string (s, maxlen, kind) ->
189189 begin try
190190 let len = String.length s in
191191+ let maxlen = max maxlen 8 in (* always show a little prefix *)
191192 let s = if len > maxlen then String.sub s 0 maxlen else s in
192193 begin match kind with
193194 | Ostr_bytes -> fprintf ppf "Bytes.of_string %S" s
+2-2
utils/diffing.mli
···6464 type left
6565 type right
6666 type eq
6767- (** Detailled equality trace *)
6767+ (** Detailed equality trace *)
68686969 type diff
7070- (** Detailled difference trace *)
7070+ (** Detailed difference trace *)
71717272 type state
7373 (** environment of a partial patch *)