merge branch 4.01 from 4.01.0 (revision 14115) to branch closure (revision 14525)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14532 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Damien Doligez 2014-04-04 17:32:35 +00:00
parent fc61342e09
commit e8d15e704c
13 changed files with 113 additions and 55 deletions

43
Changes
View File

@ -20,7 +20,7 @@ Other libraries:
Type system:
* Keep typing of pattern cases independent in principal mode
(i.e. information from previous cases is no longer used when typing
patterns; cf. PR6235' in typing-warnings/records.ml)
patterns; cf. 'PR#6235' in testsuite/test/typing-warnings/records.ml)
- Allow opening a first-class module or applying a generative functor
in the body of a generative functor. Allow it also in the body of
an applicative functor if no types are created
@ -78,10 +78,25 @@ Bug fixes:
- PR#6062: Fix a regression bug caused by commit 13047
- PR#6109: Typos in ocamlbuild error messages
- PR#6116: more efficient implementation of Digest.to_hex (patch by ygrek)
- PR#6165: Alterations to handling of \013 in source files breaking other tools
- PR#6173: Typing error message is worse that before
- PR#6174: OCaml compiler loops on an example using GADTs (-rectypes case)
- PR#6175: Fix open!
- PR#6183: enhanced documentation for 'Unix.shutdown_connection'
- PR#6184: ocamlbuild: `ocamlfind ocamldep` does not support -predicate
(report and patch by Jacques-Pascal Deplaix)
- PR#6194: Incorrect unused warning with first-class modules in patterns
- PR#6216: inlining of GADT matches generates invalid assembly
- PR#6233: out-of-bounds exceptions lose their locations on ARM, PowerPC
- PR#6235: Issue with type information flowing through a variant pattern
- PR#6239: sometimes wrong stack alignment when raising exceptions
in -g mode with backtraces active
- PR#6240: Fail to expand module type abbreviation during substyping
- PR#6241: Assumed inequality between paths involving functor arguments
- PR#6243: Make "ocamlopt -g" more resistant to ill-formed locations
- PR#6262: equality of first-class modules take module aliases into account
- PR#6267: more information printed by "bt" command of ocamldebug
- PR#6275: Soundness bug related to type constraints
- PR#6293: Assert_failure with invalid package type
- PR#6307: Behavior of 'module type of' w.r.t. module aliases
- PR#6346: Build failure with latest version of xcode on OSX
@ -111,29 +126,6 @@ Features wishes:
- shorten syntax for functor signatures: "functor (M1:S1) (M2:S2) .. -> .."
(patches by Thomas Gazagnaire and Jeremy Yallop, review by Gabriel Scherer)
OCaml 4.01.1:
-------------
Bug fixes:
- PR#4855: 'camlp4 -I +dir' accepted, dir is related to 'camlp4 -where'
- PR#5820: Fix camlp4 lexer roll back problem
- PR#6062: Fix a regression bug caused by commit 13047
- PR#6165: Alterations to handling of \013 in source files breaking other tools
- PR#6173: Typing error message is worse that before
- PR#6174: OCaml compiler loops on an example using GADTs (non -rectypes)
- PR#6175: Fix open!
- PR#6183: enhanced documentation for 'Unix.shutdown_connection'
- PR#6216: inlining of GADT matches generates invalid assembly
- PR#6233: out-of-bounds exceptions lose their locations on ARM, PowerPC
- PR#6235: Issue with type information flowing through a variant pattern
- PR#6239: sometimes wrong stack alignment when raising exceptions
in -g mode with backtraces active
- PR#6240: Fail to expand module type abbreviation during substyping
- PR#6241: Assumed inequality between paths involving functor arguments
- PR#6243: Make "ocamlopt -g" more resistant to ill-formed locations
- PR#6267: more information printed by "bt" command of ocamldebug
- PR#6275: Soundness bug related to type constraints
OCaml 4.01.0:
-------------
@ -510,6 +502,8 @@ Bug fixes:
(Jacques Garrigue, report by Leo P. White)
- PR#6164: segmentation fault on Num.power_num of 0/1
(Fabrice Le Fessant, report by Johannes Kanig)
- PR#6210: Camlp4 location error
(Hongbo Zhang, report by Jun Furuse)
Feature wishes:
- PR#5181: Merge common floating point constants in ocamlopt
@ -703,6 +697,7 @@ Installation procedure:
(-runtime-variant) to select the debug runtime.
Bug Fixes:
- PR#1643: functions of the Lazy module whose named started with 'lazy_' have
been deprecated, and new ones without the prefix added
- PR#3571: in Bigarrays, call msync() before unmapping to commit changes

View File

@ -117,12 +117,13 @@ all: runtime ocamlc ocamllex ocamlyacc ocamltools library ocaml \
# Compile everything the first time
world: coldstart all
# Complete bootstrapping cycle
bootstrap:
# Core bootstrapping cycle
coreboot:
# Save the original bootstrap compiler
$(MAKEREC) backup
# Promote the new compiler but keep the old runtime
# This compiler runs on boot/ocamlrun and produces bytecode for byterun/ocamlrun
# This compiler runs on boot/ocamlrun and produces bytecode for
# byterun/ocamlrun
$(MAKEREC) promote-cross
# Rebuild ocamlc and ocamllex (run on byterun/ocamlrun)
$(MAKEREC) partialclean
@ -131,12 +132,18 @@ bootstrap:
$(MAKEREC) library-cross
# Promote the new compiler and the new runtime
$(MAKEREC) promote
# Rebuild everything, including ocaml and the tools
# Rebuild the core system
$(MAKEREC) partialclean
$(MAKEREC) all
$(MAKEREC) core
# Check if fixpoint reached
$(MAKEREC) compare
# Do a complete bootstrapping cycle
bootstrap:
$(MAKEREC) coreboot
$(MAKEREC) all
$(MAKEREC) compare
LIBFILES=stdlib.cma std_exit.cmo *.cmi camlheader
# Start up the system from the distribution compiler
@ -149,7 +156,7 @@ coldstart:
cd stdlib ; cp $(LIBFILES) ../boot
# Build the core system: the minimum needed to make depend and bootstrap
core : runtime ocamlc ocamllex ocamlyacc ocamltools library
core: runtime ocamlc ocamllex ocamlyacc ocamltools library
# Save the current bootstrap compiler
MAXSAVED=boot/Saved/Saved.prev/Saved.prev/Saved.prev/Saved.prev/Saved.prev

View File

@ -1,4 +1,4 @@
4.02.0+dev3-2013-12-19
4.02.0+dev4-2014-04-03
# The version string is the first line of this file.
# It must be in the format described in stdlib/sys.mli

View File

@ -41,10 +41,35 @@ let get_unix_environment () =
String.concat "" (List.map f !Debugger_config.environment)
;;
(* Notes:
1. This quoting is not the same as [Filename.quote] because the "set"
command is a shell built-in and its quoting rules are different
from regular commands.
2. Microsoft's documentation omits the double-quote from the list
of characters that need quoting, but that is a mistake (unquoted
quotes are included in the value, but they alter the quoting of
characters between them).
Reference: http://msdn.microsoft.com/en-us/library/bb490954.aspx
*)
let quote_for_windows_shell s =
let b = Buffer.create (20 + String.length s) in
for i = 0 to String.length s - 1 do
begin match s.[i] with
| '<' | '>' | '|' | '&' | '^' | '\"' ->
Buffer.add_char b '^';
| _ -> ()
end;
Buffer.add_char b s.[i];
done;
Buffer.contents b
;;
(* Returns a command line prefix to set environment for the debuggee *)
let get_win32_environment () =
(* Note: no space before the & or Windows will add it to the value *)
let f (vname, vvalue) = Printf.sprintf "set %s=%s&" vname vvalue in
let f (vname, vvalue) =
Printf.sprintf "set %s=%s&" vname (quote_for_windows_shell vvalue)
in
String.concat "" (List.map f !Debugger_config.environment)
(* A generic function for launching the program *)

View File

@ -724,6 +724,7 @@ struct
mk_warn_error F._warn_error;
mk_warn_help F._warn_help;
mk_where F._where;
mk__ F.anonymous;
mk_nopervasives F._nopervasives;
mk_use_prims F._use_prims;
@ -733,8 +734,6 @@ struct
mk_drawlambda F._drawlambda;
mk_dlambda F._dlambda;
mk_dinstr F._dinstr;
mk__ F.anonymous;
]
end;;
@ -765,6 +764,7 @@ struct
mk_w F._w;
mk_warn_error F._warn_error;
mk_warn_help F._warn_help;
mk__ F.anonymous;
mk_dsource F._dsource;
mk_dparsetree F._dparsetree;
@ -772,8 +772,6 @@ struct
mk_drawlambda F._drawlambda;
mk_dlambda F._dlambda;
mk_dinstr F._dinstr;
mk__ F.anonymous;
]
end;;
@ -832,6 +830,7 @@ struct
mk_warn_error F._warn_error;
mk_warn_help F._warn_help;
mk_where F._where;
mk__ F.anonymous;
mk_nopervasives F._nopervasives;
mk_dsource F._dsource;
@ -853,8 +852,6 @@ struct
mk_dscheduling F._dscheduling;
mk_dlinear F._dlinear;
mk_dstartup F._dstartup;
mk__ F.anonymous;
]
end;;
@ -887,6 +884,7 @@ module Make_opttop_options (F : Opttop_options) = struct
mk_w F._w;
mk_warn_error F._warn_error;
mk_warn_help F._warn_help;
mk__ F.anonymous;
mk_dsource F._dsource;
mk_dparsetree F._dparsetree;
@ -906,7 +904,5 @@ module Make_opttop_options (F : Opttop_options) = struct
mk_dscheduling F._dscheduling;
mk_dlinear F._dlinear;
mk_dstartup F._dstartup;
mk__ F.anonymous;
]
end;;

View File

@ -799,8 +799,8 @@ val setitimer :
its previous status. The [s] argument is interpreted as follows:
[s.it_value], if nonzero, is the time to the next timer expiration;
[s.it_interval], if nonzero, specifies a value to
be used in reloading it_value when the timer expires.
Setting [s.it_value] to zero disable the timer.
be used in reloading [it_value] when the timer expires.
Setting [s.it_value] to zero disables the timer.
Setting [s.it_interval] to zero causes the timer to be disabled
after its next expiration. *)

View File

@ -255,7 +255,7 @@ let () =
}
let newline = ('\013'* '\010' )
let newline = ('\013'* '\010')
let blank = [' ' '\009' '\012']
let lowercase = ['a'-'z' '_']
let uppercase = ['A'-'Z']

View File

@ -47,6 +47,8 @@ corekernel
core_kernel-109.37.00
cryptokit
cryptokit-1.6
csv
csv-1.3.1
customprintf
custom_printf-109.27.00
dbm
@ -140,7 +142,7 @@ variantslib-109.15.00
vsyml
vsyml-2010-04-06
xmllight
xml-light-2.2
xml-light.2.3
xmlm
xmlm-1.1.0
zarith

View File

@ -856,20 +856,20 @@ distclean::
all: ocgi
# http://tech.motion-twin.com/xmllight
XMLLIGHT=xml-light-2.2
${XMLLIGHT}.zip:
${WGET} http://tech.motion-twin.com/zip/$@
xmllight: ${XMLLIGHT}.zip
XMLLIGHT=xml-light.2.3
${XMLLIGHT}.tar.gz:
${WGET} https://github.com/bguil/ocamllibs/releases/download/xml-light.2.3/$@
xmllight: ${XMLLIGHT}.tar.gz
printf "%s " "$@" >/dev/tty
test -d ${PREFIX}
rm -rf xml-light ${XMLLIGHT}
unzip ${XMLLIGHT}.zip && mv xml-light ${XMLLIGHT}
tar zxf ${XMLLIGHT}.tar.gz
./Patcher.sh ${XMLLIGHT}
( cd ${XMLLIGHT} && \
export PATH=${PREFIX}/bin:$$PATH && \
${MAKE} xml_parser.ml && \
${MAKE} all opt && \
${MAKE} install )
${MAKE} install_ocamlfind )
echo ${VERSION} >$@
clean::
rm -rf ${XMLLIGHT} xml-light xmllight
@ -1529,7 +1529,7 @@ distclean::
rm -f ${KAPUTT}.tar.gz
all: kaputt
#http://www.coherentpdf.com/ocaml-libraries.html
# http://www.coherentpdf.com/ocaml-libraries.html
CAMLPDF=camlpdf-0.5
${CAMLPDF}.tar.bz2:
${WGET} http://www.coherentpdf.com/$@
@ -1550,6 +1550,29 @@ distclean::
rm -f ${CAMLPDF}.tar.gz
all: camlpdf
# https://forge.ocamlcore.org/projects/csv
CSV=csv-1.3.1
${CSV}.tar.gz:
${WGET} https://forge.ocamlcore.org/frs/download.php/1235/$@
csv: ${CSV}.tar.gz findlib
printf "%s " "$@" >/dev/tty
test -d ${PREFIX}
rm -rf ${CSV}
tar zxf ${CSV}.tar.gz
./Patcher.sh ${CSV}
( cd ${CSV} && \
export PATH=${PREFIX}/bin:$$PATH && \
ocaml setup.ml -configure --enable-tests --prefix ${PREFIX} && \
ocaml setup.ml -build && \
ocamlfind remove csv && \
ocaml setup.ml -install )
echo ${VERSION} >$@
clean::
rm -rf ${CSV} csv
distclean::
rm -f ${CSV}.tar.gz
all: csv
# disabled: need to be updated for new AST stuff
# # http://pauillac.inria.fr/~ddr/camlp5/
# CAMLP5=camlp5-6.10

View File

@ -13,7 +13,7 @@
BASEDIR=../..
#MODULES=
MAIN_MODULE=fstclassmod
ADD_COMPFLAGS=-w a
ADD_COMPFLAGS=-w A -warn-error A
include $(BASEDIR)/makefiles/Makefile.one
include $(BASEDIR)/makefiles/Makefile.common

View File

@ -146,11 +146,20 @@ let () =
module type S1 = sig end
module type S2 = S1
let f (x : (module S1)) : (module S2) = x
let _f (x : (module S1)) : (module S2) = x
module X = struct
module type S
end
module Y = struct include X end
let f (x : (module X.S)) : (module Y.S) = x
let _f (x : (module X.S)) : (module Y.S) = x
(* PR#6194, main example *)
module type S3 = sig val x : bool end;;
let f = function
| Some (module M : S3) when M.x ->1
| Some _ -> 2
| None -> 3
;;
print_endline (string_of_int (f (Some (module struct let x = false end))));;

View File

@ -4,3 +4,4 @@ abc/def/xyz xyz/def/abc
XXXXXXXX
10
(123,("A",456))
2

View File

@ -189,7 +189,7 @@ let rec modtypes env cxt subst mty1 mty2 =
and try_modtypes env cxt subst mty1 mty2 =
match (mty1, mty2) with
(Mty_alias p1, Mty_alias p2) ->
| (Mty_alias p1, Mty_alias p2) ->
if Path.same p1 p2 then Tcoerce_none else
let p1 = Env.normalize_path None env p1
and p2 = Env.normalize_path None env (Subst.module_path subst p2) in