Skip to content

Commit cf72671

Browse files
authored
Merge pull request #3883 from BuckleScript/snapshot_for_4.06
snapshot for 4.06
2 parents 954b039 + 32fb59b commit cf72671

File tree

11 files changed

+1846
-1172
lines changed

11 files changed

+1846
-1172
lines changed

lib/4.06.1/bsb.ml

Lines changed: 505 additions & 182 deletions
Large diffs are not rendered by default.

lib/4.06.1/bsb_helper.ml

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -611,10 +611,18 @@ val map :
611611
('a -> 'b) ->
612612
'b list
613613

614+
val map_combine :
615+
'a list ->
616+
'b list ->
617+
('a -> 'c) ->
618+
('c * 'b) list
619+
614620
val has_string :
615621
string list ->
616622
string ->
617623
bool
624+
625+
618626
val map_split_opt :
619627
'a list ->
620628
('a -> 'b option * 'c option) ->
@@ -1019,6 +1027,13 @@ let rec has_string l f =
10191027
| x1 :: x2 :: x3 :: x4 ->
10201028
x1 = f || x2 = f || x3 = f || has_string x4 f
10211029

1030+
let rec map_combine l1 l2 f =
1031+
match (l1, l2) with
1032+
([], []) -> []
1033+
| (a1::l1, a2::l2) ->
1034+
(f a1, a2) :: map_combine l1 l2 f
1035+
| (_, _) ->
1036+
invalid_arg "Ext_list.map_combine"
10221037

10231038
let rec map_split_opt
10241039
(xs : 'a list) (f : 'a -> 'b option * 'c option)
@@ -4126,13 +4141,14 @@ type kind = Js | Bytecode | Native
41264141
val deps_of_channel : in_channel -> string list
41274142

41284143

4129-
4130-
val emit_d:
4144+
val emit_d:
4145+
kind ->
41314146
Bsb_dir_index.t ->
41324147
string option ->
41334148
string ->
41344149
string -> (* empty string means no mliast *)
41354150
unit
4151+
41364152
end = struct
41374153
#1 "bsb_helper_depfile_gen.ml"
41384154
(* Copyright (C) 2015-2016 Bloomberg Finance L.P.
@@ -4380,6 +4396,7 @@ let oc_intf
43804396

43814397

43824398
let emit_d
4399+
compilation_kind
43834400
(index : Bsb_dir_index.t)
43844401
(namespace : string option) (mlast : string) (mliast : string) =
43854402
let data =
@@ -4388,9 +4405,12 @@ let emit_d
43884405
let buf = Ext_buffer.create 2048 in
43894406
let filename =
43904407
Ext_filename.new_extension mlast Literals.suffix_d in
4391-
let lhs_suffix = Literals.suffix_cmj in
4392-
let rhs_suffix = Literals.suffix_cmj in
4393-
4408+
let lhs_suffix, rhs_suffix =
4409+
match compilation_kind with
4410+
| Js -> Literals.suffix_cmj, Literals.suffix_cmj
4411+
| Bytecode -> Literals.suffix_cmo, Literals.suffix_cmo
4412+
| Native -> Literals.suffix_cmx, Literals.suffix_cmx
4413+
in
43944414
oc_impl
43954415
mlast
43964416
index
@@ -4409,12 +4429,6 @@ let emit_d
44094429
end;
44104430
write_file filename buf
44114431

4412-
4413-
4414-
4415-
4416-
4417-
44184432
end
44194433
module Bsb_helper_main : sig
44204434
#1 "bsb_helper_main.mli"
@@ -4480,6 +4494,8 @@ end = struct
44804494
* along with this program; if not, write to the Free Software
44814495
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
44824496

4497+
let compilation_kind = ref Bsb_helper_depfile_gen.Js
4498+
44834499
let hash : string ref = ref ""
44844500
let batch_files = ref []
44854501
let collect_file name =
@@ -4509,11 +4525,13 @@ let () =
45094525
match !batch_files with
45104526
| [x]
45114527
-> Bsb_helper_depfile_gen.emit_d
4528+
!compilation_kind
45124529
(Bsb_dir_index.of_int !dev_group )
45134530
!namespace x ""
45144531
| [y; x] (* reverse order *)
45154532
->
45164533
Bsb_helper_depfile_gen.emit_d
4534+
!compilation_kind
45174535
(Bsb_dir_index.of_int !dev_group)
45184536
!namespace x y
45194537
| _ ->

lib/4.06.1/bsdep.ml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29330,10 +29330,18 @@ val map :
2933029330
('a -> 'b) ->
2933129331
'b list
2933229332

29333+
val map_combine :
29334+
'a list ->
29335+
'b list ->
29336+
('a -> 'c) ->
29337+
('c * 'b) list
29338+
2933329339
val has_string :
2933429340
string list ->
2933529341
string ->
2933629342
bool
29343+
29344+
2933729345
val map_split_opt :
2933829346
'a list ->
2933929347
('a -> 'b option * 'c option) ->
@@ -29738,6 +29746,13 @@ let rec has_string l f =
2973829746
| x1 :: x2 :: x3 :: x4 ->
2973929747
x1 = f || x2 = f || x3 = f || has_string x4 f
2974029748

29749+
let rec map_combine l1 l2 f =
29750+
match (l1, l2) with
29751+
([], []) -> []
29752+
| (a1::l1, a2::l2) ->
29753+
(f a1, a2) :: map_combine l1 l2 f
29754+
| (_, _) ->
29755+
invalid_arg "Ext_list.map_combine"
2974129756

2974229757
let rec map_split_opt
2974329758
(xs : 'a list) (f : 'a -> 'b option * 'c option)
@@ -35392,6 +35407,8 @@ val refmt : string option ref
3539235407
val is_reason : bool ref
3539335408

3539435409
val js_stdout : bool ref
35410+
35411+
val all_module_aliases : bool ref
3539535412
end = struct
3539635413
#1 "js_config.ml"
3539735414
(* Copyright (C) 2015-2016 Bloomberg Finance L.P.
@@ -35506,6 +35523,8 @@ let refmt = ref None
3550635523
let is_reason = ref false
3550735524

3550835525
let js_stdout = ref true
35526+
35527+
let all_module_aliases = ref false
3550935528
end
3551035529
module Bs_warnings : sig
3551135530
#1 "bs_warnings.mli"
@@ -45505,7 +45524,7 @@ let set_attrs = [Ast_attributes.bs_set]
4550545524

4550645525
let deprecated name =
4550745526
Ast_attributes.deprecated
45508-
("use " ^ name ^ "Get instead, or swith to the new [@bs.deriving {abstract: light}] for the type declaration (OCaml syntax: [@@bs.deriving {abstract = light}])")
45527+
("use " ^ name ^ "Get instead, or switch to the new [@bs.deriving {abstract: light}] for the type declaration (OCaml syntax: [@@bs.deriving {abstract = light}])")
4550945528

4551045529

4551145530
let handleTdcl

lib/4.06.1/bsppx.ml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4900,6 +4900,8 @@ val refmt : string option ref
49004900
val is_reason : bool ref
49014901

49024902
val js_stdout : bool ref
4903+
4904+
val all_module_aliases : bool ref
49034905
end = struct
49044906
#1 "js_config.ml"
49054907
(* Copyright (C) 2015-2016 Bloomberg Finance L.P.
@@ -5014,6 +5016,8 @@ let refmt = ref None
50145016
let is_reason = ref false
50155017

50165018
let js_stdout = ref true
5019+
5020+
let all_module_aliases = ref false
50175021
end
50185022
(** Interface as module *)
50195023
module Asttypes
@@ -7837,10 +7841,18 @@ val map :
78377841
('a -> 'b) ->
78387842
'b list
78397843

7844+
val map_combine :
7845+
'a list ->
7846+
'b list ->
7847+
('a -> 'c) ->
7848+
('c * 'b) list
7849+
78407850
val has_string :
78417851
string list ->
78427852
string ->
78437853
bool
7854+
7855+
78447856
val map_split_opt :
78457857
'a list ->
78467858
('a -> 'b option * 'c option) ->
@@ -8245,6 +8257,13 @@ let rec has_string l f =
82458257
| x1 :: x2 :: x3 :: x4 ->
82468258
x1 = f || x2 = f || x3 = f || has_string x4 f
82478259

8260+
let rec map_combine l1 l2 f =
8261+
match (l1, l2) with
8262+
([], []) -> []
8263+
| (a1::l1, a2::l2) ->
8264+
(f a1, a2) :: map_combine l1 l2 f
8265+
| (_, _) ->
8266+
invalid_arg "Ext_list.map_combine"
82488267

82498268
let rec map_split_opt
82508269
(xs : 'a list) (f : 'a -> 'b option * 'c option)
@@ -24537,7 +24556,7 @@ let set_attrs = [Ast_attributes.bs_set]
2453724556

2453824557
let deprecated name =
2453924558
Ast_attributes.deprecated
24540-
("use " ^ name ^ "Get instead, or swith to the new [@bs.deriving {abstract: light}] for the type declaration (OCaml syntax: [@@bs.deriving {abstract = light}])")
24559+
("use " ^ name ^ "Get instead, or switch to the new [@bs.deriving {abstract: light}] for the type declaration (OCaml syntax: [@@bs.deriving {abstract = light}])")
2454124560

2454224561

2454324562
let handleTdcl

lib/4.06.1/unstable/all_ounit_tests.ml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1776,10 +1776,18 @@ val map :
17761776
('a -> 'b) ->
17771777
'b list
17781778

1779+
val map_combine :
1780+
'a list ->
1781+
'b list ->
1782+
('a -> 'c) ->
1783+
('c * 'b) list
1784+
17791785
val has_string :
17801786
string list ->
17811787
string ->
17821788
bool
1789+
1790+
17831791
val map_split_opt :
17841792
'a list ->
17851793
('a -> 'b option * 'c option) ->
@@ -2184,6 +2192,13 @@ let rec has_string l f =
21842192
| x1 :: x2 :: x3 :: x4 ->
21852193
x1 = f || x2 = f || x3 = f || has_string x4 f
21862194

2195+
let rec map_combine l1 l2 f =
2196+
match (l1, l2) with
2197+
([], []) -> []
2198+
| (a1::l1, a2::l2) ->
2199+
(f a1, a2) :: map_combine l1 l2 f
2200+
| (_, _) ->
2201+
invalid_arg "Ext_list.map_combine"
21872202

21882203
let rec map_split_opt
21892204
(xs : 'a list) (f : 'a -> 'b option * 'c option)
@@ -7261,6 +7276,8 @@ val refmt : string option ref
72617276
val is_reason : bool ref
72627277

72637278
val js_stdout : bool ref
7279+
7280+
val all_module_aliases : bool ref
72647281
end = struct
72657282
#1 "js_config.ml"
72667283
(* Copyright (C) 2015-2016 Bloomberg Finance L.P.
@@ -7375,6 +7392,8 @@ let refmt = ref None
73757392
let is_reason = ref false
73767393

73777394
let js_stdout = ref true
7395+
7396+
let all_module_aliases = ref false
73787397
end
73797398
module Ml_binary : sig
73807399
#1 "ml_binary.mli"

0 commit comments

Comments
 (0)