summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez-inria.fr>2013-05-22 12:56:54 +0000
committerDamien Doligez <damien.doligez-inria.fr>2013-05-22 12:56:54 +0000
commitc3bf54a7b671bddfc1d8fd63e8221698f0e2b66a (patch)
treea70877e688c96878531ebad24f48f954bd6b14a5
parentccf56e3b2a20176a99d559229f39d4699db55fd4 (diff)
downloadocaml-c3bf54a7b671bddfc1d8fd63e8221698f0e2b66a.tar.gz
merge changes from version/4.00 from 4.00.1 to r13697
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13699 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--Changes70
-rw-r--r--VERSION2
-rw-r--r--asmcomp/cmmgen.ml17
-rw-r--r--byterun/extern.c3
-rw-r--r--byterun/memory.c2
-rw-r--r--otherlibs/labltk/frx/.ignore1
-rw-r--r--parsing/pprintast.ml51
-rw-r--r--testsuite/tests/letrec/record_with.ml37
-rw-r--r--testsuite/tests/letrec/record_with.reference1
-rw-r--r--testsuite/tests/lib-marshal/intext.ml3
-rw-r--r--testsuite/tests/runtime-errors/Makefile1
-rw-r--r--testsuite/tests/tool-ocamldoc/Makefile4
-rwxr-xr-xtools/make-package-macosx7
-rw-r--r--typing/includecore.ml2
14 files changed, 135 insertions, 66 deletions
diff --git a/Changes b/Changes
index c4c285db14..c571b7e5a6 100644
--- a/Changes
+++ b/Changes
@@ -19,8 +19,8 @@ Compilers:
- ocamldep now supports -absname
- PR#5768: On "unbound identifier" errors, use spell-checking to suggest names
present in the environment
-- ocamlc has a new option -dsource which visualize the parsetree
-- tools/eqparsetree compare two parsetree ignoring location
+- ocamlc has a new option -dsource to visualize the parsetree
+- tools/eqparsetree compares two parsetree ignoring location
- ocamlopt now uses clang as assembler on OS X if available, which enables
CFI support for OS X.
- Added a new -short-paths option, which attempts to use the shortest
@@ -29,22 +29,24 @@ Compilers:
uses lots of functors.
- PR#5986: added flag -compat-32 to ocamlc, ensuring that the generated
bytecode executable can be loaded on 32-bit hosts.
-- PR#5980: warning on open statements which shadow an existing identifier (which turns out to be actually used in the scope of the open)
+- PR#5980: warning on open statements which shadow an existing identifier
+ (if it is actually used in the scope of the open)
Standard library:
- PR#5986: new flag Marshal.Compat_32 for the serialization functions
(Marshal.to_*), forcing the output to be readable on 32-bit hosts.
Bug fixes:
-- PR#5910: Fix code generation bug for "mod 1" on ARM.
-- PR#5973: Format module incorrectly parses format string
-- PR#5121: %( %) in Format module seems to be broken
-- PR#4887: input_char after close_in crashes ocaml (msvc runtime)
- PR#4762: ?? is not used at all, but registered as a lexer token
+- PR#4887: input_char after close_in crashes ocaml (msvc runtime)
- PR#4994: ocaml-mode doesn't work with xemacs21
+- PR#5102: ocamlbuild fails when using an unbound variable in rule dependency
* PR#5119: camlp4 now raises a specific exception when 'DELETE_RULE' fails,
rather than raising 'Not_found'
+- PR#5121: %( %) in Format module seems to be broken
- PR#5212: Improve ocamlbuild error messages of _tags parser
+- PR#5240: register exception printers for Unix.Unix_error and Dynlink.Error
+- PR#5300: ocamlbuild: verbose parameter should implicitly set classic display
- PR#5327: (Windows) Unix.select blocks if same socket listed in first and
third arguments
- PR#5343: ocaml -rectypes is unsound wrt module subtyping (was still unsound)
@@ -66,27 +68,49 @@ Bug fixes:
- PR#5752: missing dependencies at byte-code link with mlpack
- PR#5758: Compiler bug when matching on floats
- PR#5763: ocamlbuild does not give correct flags when running menhir
+- PR#5772: problem with marshaling of mutually-recursive functions
+- PR#5775: several bug fixes for tools/pprintast.ml
- PR#5784: -dclambda option is ignored
+- PR#5785: misbehaviour with abstracted structural type used as GADT index
- PR#5787: Bad behavior of 'Unused ...' warnings in the toplevel
- PR#5770: Syntax error messages involving unclosed parens are sometimes
incorrect
+- PR#5793: integer marshalling is inconsistent between architectures
+- PR#5798: add ARM VFPv2 support for Raspbian (ocamlopt)
- PR#5805: Assert failure with warning 34 on pre-processed file
+- PR#5806: ensure that backtrace tests are always run (testsuite)
+- PR#5810: error in switch printing when using -dclambda
+- PR#5819: segfault when using [with] on large recursive record (ocamlopt)
- PR#5821: Wrong record field is reported as duplicate
- PR#5824: Generate more efficient code for immediate right shifts.
- PR#5825: Add a toplevel primitive to use source file wrapped with the
coresponding module
- PR#5835: nonoptional labeled arguments can be passed with '?'
+- PR#5840: improved documentation for 'Unix.lseek'
+- PR#5858: Assert failure during typing of class
- PR#5865: assert failure when reporting undefined field label
+- PR#5880: 'Genlex.make_lexer' documention mentions the wrong exception
- PR#5885: Incorrect rule for compiling C stubs when shared libraries are not
supported.
+- PR#5891: ocamlbuild: support rectypes tag for mlpack
+- PR#5892: GADT exhaustiveness check is broken
+- PR#5906: GADT exhaustiveness check is still broken
+- PR#5907: Undetected cycle during typecheck causes exceptions
+- PR#5910: Fix code generation bug for "mod 1" on ARM.
+- PR#5911: Signature substitutions fail in submodules
+- PR#5920, PR#2957: linking failure for big bytecodes on 32bit architectures
- PR#5928: Missing space between words in manual page for ocamlmktop
-- ocamlbuild now picks the non-core tools like ocamlfind and menhir from PATH
- PR#5930: ocamldep leaks temporary preprocessing files
- PR#5934: integer shift by negative amount (in otherlibs/num)
-- PR#5920, PR#2957: linking failure for big bytecodes on 32bit architectures
+- PR#5944: Bad typing performances of big variant type declaration
+- PR#5948: GADT with polymorphic variants bug
- PR#5965: disallow auto-reference to a recursive module in its definition
+- PR#5973: Format module incorrectly parses format string
- PR#5981: Incompatibility check assumes abstracted types are injective
- PR#5985: Unexpected interaction between variance and GADTs
+- PR#5989: Assumed inequalities involving private rows
+- PR#5993: Variance of private type abbreviations not checked for modules
+- PR#5997: Non-compatibility assumed for concrete types with same constructor
- PR#6004: Type information does not flow to "inherit" parameters
- PR#6005: Type unsoundness with recursive modules
- PR#6010: Big_int.extract_big_int gives wrong results on negative arguments
@@ -108,35 +132,9 @@ Tools:
- OCamlbuild now features a bin_annot tag to generate .cmt files.
- OCamlbuild now features a strict_sequence tag to trigger the strict-sequence
option.
+- OCamlbuild now picks the non-core tools like ocamlfind and menhir from PATH
- PR#5884: Misc minor fixes and cleanup for emacs mode
-OCaml 4.00.2:
--------------
-
-Bug fixes:
-- PR#5102: ocamlbuild fails when using an unbound variable in rule dependency
-- PR#5240: register exception printers for Unix.Unix_error and Dynlink.Error
-- PR#5300: verbose parameter should implicitly set classic display
-- PR#5772: problem with marshaling of mutually-recursive functions
-- PR#5775: several bug fixes for tools/pprintast.ml
-- PR#5785: misbehaviour with abstracted structural type used as GADT index
-- PR#5793: integer marshalling is inconsistent between architectures
-- PR#5798: add ARM VFPv2 support for Raspbian (ocamlopt)
-- PR#5806: ensure that backtrace tests are always run (testsuite)
-- PR#5810: error in switch printing when using -dclambda
-- PR#5840: improved documentation for 'Unix.lseek'
-- PR#5858: Assert failure during typing of class
-- PR#5880: 'Genlex.make_lexer' documention mentions the wrong exception
-- PR#5891: support rectypes tag for mlpack (ocamlbuild)
-- PR#5892: GADT exhaustiveness check is broken
-- PR#5906: GADT exhaustiveness check is still broken
-- PR#5907: Undetected cycle during typecheck causes exceptions
-- PR#5911: Signature substitutions fail in submodules
-- PR#5944: Bad typing performances of big variant type declaration
-- PR#5948: GADT with polymorphic variants bug
-- PR#5989: Assumed inequalities involving private rows
-- PR#5993: Variance of private type abbreviations not checked for modules
-- PR#5997: Non-compatibility assumed for concrete types with same constructor
OCaml 4.00.1:
-------------
diff --git a/VERSION b/VERSION
index 77adf4d1ab..d8f88d131d 100644
--- a/VERSION
+++ b/VERSION
@@ -1,4 +1,4 @@
-4.01.0+dev13-2013-04-18
+4.01.0+dev14-2013-05-22
# The version string is the first line of this file.
# It must be in the format described in stdlib/sys.mli
diff --git a/asmcomp/cmmgen.ml b/asmcomp/cmmgen.ml
index d7baf251b1..f3b01ff2bf 100644
--- a/asmcomp/cmmgen.ml
+++ b/asmcomp/cmmgen.ml
@@ -438,21 +438,27 @@ type rhs_kind =
| RHS_floatblock of int
| RHS_nonrec
;;
-let rec expr_size = function
+let rec expr_size env = function
+ | Uvar id ->
+ begin try Ident.find_same id env with Not_found -> RHS_nonrec end
| Uclosure(fundecls, clos_vars) ->
RHS_block (fundecls_size fundecls + List.length clos_vars)
| Ulet(id, exp, body) ->
- expr_size body
+ expr_size (Ident.add id (expr_size env exp) env) body
| Uletrec(bindings, body) ->
- expr_size body
+ expr_size env body
| Uprim(Pmakeblock(tag, mut), args, _) ->
RHS_block (List.length args)
| Uprim(Pmakearray(Paddrarray | Pintarray), args, _) ->
RHS_block (List.length args)
| Uprim(Pmakearray(Pfloatarray), args, _) ->
RHS_floatblock (List.length args)
+ | Uprim (Pduprecord (Record_regular, sz), _, _) ->
+ RHS_block sz
+ | Uprim (Pduprecord (Record_float, sz), _, _) ->
+ RHS_floatblock sz
| Usequence(exp, exp') ->
- expr_size exp'
+ expr_size env exp'
| _ -> RHS_nonrec
(* Record application and currying functions *)
@@ -1867,7 +1873,8 @@ and transl_switch arg index cases = match Array.length cases with
(Array.of_list !inters) actions)
and transl_letrec bindings cont =
- let bsz = List.map (fun (id, exp) -> (id, exp, expr_size exp)) bindings in
+ let bsz =
+ List.map (fun (id, exp) -> (id, exp, expr_size Ident.empty exp)) bindings in
let op_alloc prim sz =
Cop(Cextcall(prim, typ_addr, true, Debuginfo.none), [int_const sz]) in
let rec init_blocks = function
diff --git a/byterun/extern.c b/byterun/extern.c
index 0eb6005506..61ad352a90 100644
--- a/byterun/extern.c
+++ b/byterun/extern.c
@@ -379,7 +379,8 @@ static void extern_rec(value v)
#ifdef ARCH_SIXTYFOUR
} else if (n < -((intnat)1 << 30) || n >= ((intnat)1 << 30)) {
if (extern_flags & COMPAT_32)
- extern_failwith("output_value: integer cannot be read back on 32-bit platform");
+ extern_failwith("output_value: integer cannot be read back on "
+ "32-bit platform");
writecode64(CODE_INT64, n);
#endif
} else
diff --git a/byterun/memory.c b/byterun/memory.c
index ba63b32452..6f86e3e9ac 100644
--- a/byterun/memory.c
+++ b/byterun/memory.c
@@ -500,7 +500,7 @@ CAMLexport void caml_adjust_gc_speed (mlsize_t res, mlsize_t max)
A block value [v] is a shared block if and only if [Is_in_heap (v)]
is true.
*/
-/* [caml_initialize] never calls the GC, so you may call it while an block is
+/* [caml_initialize] never calls the GC, so you may call it while a block is
unfinished (i.e. just after a call to [caml_alloc_shr].) */
void caml_initialize (value *fp, value val)
{
diff --git a/otherlibs/labltk/frx/.ignore b/otherlibs/labltk/frx/.ignore
deleted file mode 100644
index 10301e28bf..0000000000
--- a/otherlibs/labltk/frx/.ignore
+++ /dev/null
@@ -1 +0,0 @@
-*.a
diff --git a/parsing/pprintast.ml b/parsing/pprintast.ml
index e409849c71..0965ca6aae 100644
--- a/parsing/pprintast.ml
+++ b/parsing/pprintast.ml
@@ -10,11 +10,12 @@
(* *)
(**************************************************************************)
-(* Original Code from Ber-metaocaml, modified fo 3.12.0 and fixed *)
+(* Original Code from Ber-metaocaml, modified for 3.12.0 and fixed *)
(* Printing code expressions *)
(* Authors: Ed Pizzi, Fabrice Le Fessant *)
-(* Extensivily Rewrite: Hongbo Zhang: University of Pennsylvania*)
+(* Extensive Rewrite: Hongbo Zhang: University of Pennsylvania *)
(* TODO more fine-grained precedence pretty-printing *)
+
open Asttypes
open Format
open Location
@@ -22,7 +23,8 @@ open Longident
open Parsetree
let prefix_symbols = [ '!'; '?'; '~' ] ;;
-let infix_symbols = [ '='; '<'; '>'; '@'; '^'; '|'; '&'; '+'; '-'; '*'; '/'; '$'; '%' ]
+let infix_symbols = [ '='; '<'; '>'; '@'; '^'; '|'; '&'; '+'; '-'; '*'; '/';
+ '$'; '%' ]
let operator_chars = [ '!'; '$'; '%'; '&'; '*'; '+'; '-'; '.'; '/';
':'; '<'; '='; '>'; '?'; '@'; '^'; '|'; '~' ]
let numeric_chars = [ '0'; '1'; '2'; '3'; '4'; '5'; '6'; '7'; '8'; '9' ]
@@ -81,9 +83,11 @@ let view_expr x =
| Pexp_construct ( {txt= Lident "[]";_},_,_) -> `nil
| Pexp_construct ( {txt= Lident"::";_},Some _,_) ->
let rec loop exp acc = match exp with
- | {pexp_desc=Pexp_construct ({txt=Lident "[]";_},_,_);_} -> (List.rev acc,true)
+ | {pexp_desc=Pexp_construct ({txt=Lident "[]";_},_,_);_} ->
+ (List.rev acc,true)
| {pexp_desc=
- Pexp_construct ({txt=Lident "::";_},Some ({pexp_desc= Pexp_tuple([e1;e2]);_}),_);_} ->
+ Pexp_construct ({txt=Lident "::";_},
+ Some ({pexp_desc= Pexp_tuple([e1;e2]);_}),_);_} ->
loop e2 (e1::acc)
| e -> (List.rev (e::acc),false) in
let (ls,b) = loop x [] in
@@ -108,7 +112,8 @@ let rec is_irrefut_patt x =
| Ppat_or (l,r) -> is_irrefut_patt l || is_irrefut_patt r
| Ppat_record (ls,_) -> List.for_all (fun (_,x) -> is_irrefut_patt x) ls
| Ppat_lazy p -> is_irrefut_patt p
- | Ppat_constant _ | Ppat_construct _ | Ppat_variant _ | Ppat_array _ | Ppat_type _-> false (*conservative*)
+ | Ppat_constant _ | Ppat_construct _ | Ppat_variant _ | Ppat_array _
+ | Ppat_type _ -> false (*conservative*)
class printer ()= object(self:'self)
val pipe = false
val semi = false
@@ -121,7 +126,8 @@ class printer ()= object(self:'self)
method reset_pipe = {<pipe=false>}
method reset = {<pipe=false;semi=false;ifthenelse=false>}
method list : 'a . ?sep:space_formatter -> ?first:space_formatter ->
- ?last:space_formatter -> (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a list -> unit
+ ?last:space_formatter -> (Format.formatter -> 'a -> unit) ->
+ Format.formatter -> 'a list -> unit
= fun ?sep ?first ?last fu f xs ->
let first = match first with Some x -> x |None -> ""
and last = match last with Some x -> x |None -> ""
@@ -155,7 +161,8 @@ class printer ()= object(self:'self)
method longident f = function
| Lident s ->
(match s.[0] with
- | 'a' .. 'z' | 'A' .. 'Z' | '_' when not (is_infix (fixity_of_string s)) ->
+ | 'a' .. 'z' | 'A' .. 'Z' | '_'
+ when not (is_infix (fixity_of_string s)) ->
pp f "%s" s
| _ -> pp f "(@;%s@;)" s )
| Ldot(y,s) -> (match s.[0] with
@@ -163,7 +170,7 @@ class printer ()= object(self:'self)
pp f "%a.%s" self#longident y s
| _ ->
pp f "%a.(@;%s@;)@ " self#longident y s)
- | Lapply (y,s)->
+ | Lapply (y,s) ->
pp f "%a(%a)" self#longident y self#longident s
method longident_loc f x = pp f "%a" self#longident x.txt
method constant f = function
@@ -172,8 +179,10 @@ class printer ()= object(self:'self)
| Const_int i -> self#paren (i<0) (fun f -> pp f "%d") f i
| Const_float i -> self#paren (i.[0]='-') (fun f -> pp f "%s") f i
| Const_int32 i -> self#paren (i<0l) (fun f -> pp f "%ldl") f i
- | Const_int64 i -> self#paren (i<0L) (fun f -> pp f "%LdL") f i (* pp f "%LdL" i *)
- | Const_nativeint i -> self#paren (i<0n) (fun f -> pp f "%ndn") f i (* pp f "%ndn" i *)
+ | Const_int64 i -> self#paren (i<0L) (fun f -> pp f "%LdL") f i
+ (* pp f "%LdL" i *)
+ | Const_nativeint i -> self#paren (i<0n) (fun f -> pp f "%ndn") f i
+ (* pp f "%ndn" i *)
(* trailing space*)
method mutable_flag f = function
@@ -236,7 +245,9 @@ class printer ()= object(self:'self)
| [] -> ()
| _ ->
pp f "%a@;.@;"
- (self#list self#tyvar ~sep:"@;") l) l) sl self#core_type ct
+ (self#list self#tyvar ~sep:"@;") l)
+ l)
+ sl self#core_type ct
| _ -> pp f "@[<2>%a@]" self#core_type1 x
method core_type1 f x =
match x.ptyp_desc with
@@ -248,7 +259,8 @@ class printer ()= object(self:'self)
(fun f l -> match l with
|[] -> ()
|[x]-> pp f "%a@;" self#core_type1 x
- | _ -> self#list ~first:"(" ~last:")@;" self#core_type ~sep:"," f l ) l self#longident_loc li
+ | _ -> self#list ~first:"(" ~last:")@;" self#core_type ~sep:"," f l)
+ l self#longident_loc li
| Ptyp_variant (l, closed, low) ->
let type_variant_helper f x =
match x with
@@ -267,7 +279,7 @@ class printer ()= object(self:'self)
pp f "%s@;%a"
(match (closed,low) with
| (true,None) -> ""
- | (true,Some _) -> "<" (* FIXME desugar the syntax sugar*)
+ | (true,Some _) -> "<" (* FIXME desugar the syntax sugar *)
| (false,_) -> ">")
(self#list type_variant_helper ~sep:"@;<1 -2>| ") l) l
(fun f low
@@ -323,7 +335,8 @@ class printer ()= object(self:'self)
| Ppat_alias (p, s) -> pp f "@[<2>%a@;as@;%a@]"
self#pattern p
(fun f s->
- if is_infix (fixity_of_string s.txt) || List.mem s.txt.[0] prefix_symbols
+ if is_infix (fixity_of_string s.txt)
+ || List.mem s.txt.[0] prefix_symbols
then pp f "( %s )" s.txt
else pp f "%s" s.txt ) s (* RA*)
| Ppat_or (p1, p2) -> (* *)
@@ -332,9 +345,11 @@ class printer ()= object(self:'self)
(match pattern_or_helper a p2 with
|Some b -> pp f "@[<2>%C..%C@]" a b
|None ->
- pp f "@[<hov0>%a@]" (self#list ~sep:"@,|" self#pattern ) (list_of_pattern [] x))
+ pp f "@[<hov0>%a@]" (self#list ~sep:"@,|" self#pattern)
+ (list_of_pattern [] x))
| _ ->
- pp f "@[<hov0>%a@]" (self#list ~sep:"@,|" self#pattern) (list_of_pattern [] x)
+ pp f "@[<hov0>%a@]" (self#list ~sep:"@,|" self#pattern)
+ (list_of_pattern [] x)
)
| _ -> self#pattern1 f x
method pattern1 (f:Format.formatter) (x:pattern) :unit =
@@ -364,7 +379,7 @@ class printer ()= object(self:'self)
| Ppat_any -> pp f "_";
| Ppat_var ({txt = txt;_}) ->
if (is_infix (fixity_of_string txt)) || List.mem txt.[0] prefix_symbols then
- if txt.[0]='*' then
+ if txt.[0]='*' || txt.[String.length txt - 1] = '*' then
pp f "(@;%s@;)@ " txt
else
pp f "(%s)" txt
diff --git a/testsuite/tests/letrec/record_with.ml b/testsuite/tests/letrec/record_with.ml
new file mode 100644
index 0000000000..daaa88c474
--- /dev/null
+++ b/testsuite/tests/letrec/record_with.ml
@@ -0,0 +1,37 @@
+(***********************************************************************)
+(* *)
+(* OCaml *)
+(* *)
+(* Damien Doligez, projet Gallium, INRIA Rocquencourt *)
+(* *)
+(* Copyright 2012 Institut National de Recherche en Informatique et *)
+(* en Automatique. All rights reserved. This file is distributed *)
+(* under the terms of the Q Public License version 1.0. *)
+(* *)
+(***********************************************************************)
+
+
+(* A regression test for both PR#4141 and PR#5819: when a recursive
+ variable is defined by a { record with ... } expression.
+*)
+
+type t = {
+ self : t;
+ t0 : int;
+ t1 : int;
+ t2 : int;
+ t3 : int;
+ t4 : int;
+};;
+let rec t = {
+ self = t;
+ t0 = 42;
+ t1 = 42;
+ t2 = 42;
+ t3 = 42;
+ t4 = 42;
+};;
+
+let rec self = { t with self=self } in
+Printf.printf "%d\n" self.self.t0
+;;
diff --git a/testsuite/tests/letrec/record_with.reference b/testsuite/tests/letrec/record_with.reference
new file mode 100644
index 0000000000..d81cc0710e
--- /dev/null
+++ b/testsuite/tests/letrec/record_with.reference
@@ -0,0 +1 @@
+42
diff --git a/testsuite/tests/lib-marshal/intext.ml b/testsuite/tests/lib-marshal/intext.ml
index e2805c652b..41f24bb654 100644
--- a/testsuite/tests/lib-marshal/intext.ml
+++ b/testsuite/tests/lib-marshal/intext.ml
@@ -544,7 +544,8 @@ let test_mutual_rec_regression () =
let g () = () in
let f q = if test_list q then g () in
- test 700 (try ignore (Marshal.to_string f [Marshal.Closures]); true with _ -> false)
+ test 700 (try ignore (Marshal.to_string f [Marshal.Closures]); true
+ with _ -> false)
let main() =
if Array.length Sys.argv <= 2 then begin
diff --git a/testsuite/tests/runtime-errors/Makefile b/testsuite/tests/runtime-errors/Makefile
index 0ec6bb00d5..b5d1d7bb4b 100644
--- a/testsuite/tests/runtime-errors/Makefile
+++ b/testsuite/tests/runtime-errors/Makefile
@@ -28,6 +28,7 @@ compile:
@grep -q HAS_STACK_OVERFLOW_DETECTION $(TOPDIR)/config/s.h \
|| rm -f stackoverflow.native$(EXE)
+.PHONY: run
run:
@ulimit -s 1024; \
for f in *.bytecode; do \
diff --git a/testsuite/tests/tool-ocamldoc/Makefile b/testsuite/tests/tool-ocamldoc/Makefile
index b9a0ac43f9..cf454149ab 100644
--- a/testsuite/tests/tool-ocamldoc/Makefile
+++ b/testsuite/tests/tool-ocamldoc/Makefile
@@ -16,9 +16,11 @@ COMPFLAGS=-I $(OTOPDIR)/ocamldoc
LD_PATH=$(TOPDIR)/otherlibs/$(UNIXLIBVAR)unix:$(TOPDIR)/otherlibs/str
DOCFLAGS=-I $(OTOPDIR)/stdlib $(COMPFLAGS)
+.PHONY: default
default:
@$(SET_LD_PATH) $(MAKE) run
+.PHONY: run
run: $(CUSTOM_MODULE).cmo
@for file in t*.ml; do \
printf " ... testing '$$file'"; \
@@ -33,8 +35,10 @@ run: $(CUSTOM_MODULE).cmo
@$(OCAMLDOC) $(DOCFLAGS) -hide-warnings -latex t*.ml 2>&1 \
| grep -v test_types_display || true
+.PHONY: promote
promote: defaultpromote
+.PHONY: clean
clean: defaultclean
@rm -f *.result *.html *.tex *.log *.out *.sty *.toc *.css *.aux
diff --git a/tools/make-package-macosx b/tools/make-package-macosx
index 8b1f7737be..657860e77b 100755
--- a/tools/make-package-macosx
+++ b/tools/make-package-macosx
@@ -100,7 +100,12 @@ EOF
chmod -R g-w root
sudo chown -R root:wheel root
-/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker \
+# HOW TO INSTALL PackageMaker:
+# Get PackageMaker.app from
+# https://developer.apple.com/downloads/index.action?name=Auxiliary
+# It's in the "Auxiliary Tools for Xcode" download.
+# Copy it to /Applications/.
+/Applications/PackageMaker.app/Contents/MacOS/PackageMaker \
-build -p "`pwd`/ocaml.pkg" -f "`pwd`/root" -i "`pwd`/Info.plist" \
-d "`pwd`/Description.plist" -r "`pwd`/resources"
diff --git a/typing/includecore.ml b/typing/includecore.ml
index 23d6537f42..fa46b39078 100644
--- a/typing/includecore.ml
+++ b/typing/includecore.ml
@@ -253,7 +253,7 @@ let type_declarations ?(equality = false) env name decl1 id decl2 =
let imp a b = not a || b in
let (co1,cn1) = get_upper v1 and (co2,cn2) = get_upper v2 in
imp abstr (imp co1 co2 && imp cn1 cn2) &&
- (abstr || Btype.(is_Tvar (repr ty)) || co1 = co2 && cn1 = cn2) &&
+ (abstr || Btype.(is_Tvar (repr ty)) || co1 = co2 && cn1 = cn2) &&
let (p1,n1,i1,j1) = get_lower v1 and (p2,n2,i2,j2) = get_lower v2 in
imp abstr (imp p2 p1 && imp n2 n1 && imp i2 i1 && imp j2 j1))
decl2.type_params (List.combine decl1.type_variance decl2.type_variance)