Skip to content

Commit d46f924

Browse files
committed
use gz for ocaml since gitignore issues (#357)
* use gz for ocaml since gitignore issues * debug prepublish later * when make world, it does not build ocaml_pack..
1 parent 4c96d10 commit d46f924

File tree

8 files changed

+376
-22
lines changed

8 files changed

+376
-22
lines changed

.gitignore

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ ocaml_pack
2727
*~
2828
stdlib/c.js
2929
*.map
30-
*.zip
31-
*.gz
3230
*#
3331
qcc/
3432
.#*
@@ -38,15 +36,12 @@ oxml
3836

3937
*.rawlambda
4038
*.lambda
41-
ocaml/*.js
42-
ocaml/*/*/*.js
43-
ocaml/*.js
39+
40+
41+
ocaml/
4442

4543

4644
test.json
47-
ocaml/bin
48-
ocaml/lib
49-
ocaml/man
5045
*~
5146
*.annot
5247
*.mj

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
language: node_js
22
env:
3-
- OCAML=4.02.3
43
- BS_TRAVIS_CI=1
54
node_js:
65
- "4.0"

jscomp/Makefile

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,17 @@ world:
8080
cd stdlib && make all
8181
@echo "Making lib finished"
8282

83+
# no depend on ./bin/ocaml_pack ./bin/bsc
84+
# since in npm mode, they are generated from a single file
85+
install:
86+
cp ./bin/bsc ../bin/
87+
cp ./runtime/*.cmt* ../lib/ocaml/
88+
cp ./runtime/*.cmj* ../lib/ocaml/
89+
cp ./stdlib/*.cm* ../lib/ocaml/
90+
8391
TMP_OCAMLLIB=$(shell ocamlopt.opt -where)
8492

93+
8594
big-world:bin/big_compiler.ml bin/big_compiler.mli
8695
@echo "Making compiler"
8796
ocamlopt.opt -g -inline 100 -linkall -w -a -I bin bin/big_compiler.mli bin/big_compiler.ml -o bin/bsc
@@ -99,7 +108,6 @@ big-world:bin/big_compiler.ml bin/big_compiler.mli
99108
cd stdlib && make all
100109
@echo "Making lib finished"
101110

102-
103111
world-test:
104112
@echo "Making compiler"
105113
ocamlopt.opt -g -inline 100 -w -a -linkall -I +compiler-libs -I bin ocamlcommon.cmxa bin/compiler.mli bin/compiler.ml -o bin/bsc
@@ -128,13 +136,6 @@ travis-world-test:./bin/ocaml_pack
128136
@echo "Generating the compiler finished"
129137
make world-test
130138

131-
# no depend on ./bin/ocaml_pack ./bin/bsc
132-
# since in npm mode, they are generated from a single file
133-
install:
134-
cp ./bin/ocaml_pack ./bin/bsc ../bin/
135-
cp ./runtime/*.cmt* ../lib/ocaml/
136-
cp ./runtime/*.cmj* ../lib/ocaml/
137-
cp ./stdlib/*.cm* ../lib/ocaml/
138139

139140
.PHONY: stdlib
140141
.PHONY: test quicktest release snapshot snapshotcmj

jscomp/runtime/fn.ml

Lines changed: 0 additions & 1 deletion
This file was deleted.

jscomp/runtime/fn.ml

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
(* Copyright (C) 2015-2016 Bloomberg Finance L.P.
2+
*
3+
* This program is free software: you can redistribute it and/or modify
4+
* it under the terms of the GNU Lesser General Public License as published by
5+
* the Free Software Foundation, either version 3 of the License, or
6+
* (at your option) any later version.
7+
*
8+
* In addition to the permissions granted to you by the LGPL, you may combine
9+
* or link a "work that uses the Library" with a publicly distributed version
10+
* of this file to produce a combined library or application, then distribute
11+
* that combined work under the terms of your choosing, with no requirement
12+
* to comply with the obligations normally placed on you by section 4 of the
13+
* LGPL version 3 (or the corresponding section of a later version of the LGPL
14+
* should you choose to use a later version).
15+
*
16+
* This program is distributed in the hope that it will be useful,
17+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19+
* GNU Lesser General Public License for more details.
20+
*
21+
* You should have received a copy of the GNU Lesser General Public License
22+
* along with this program; if not, write to the Free Software
23+
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
24+
25+
26+
27+
28+
29+
30+
31+
32+
(* if we allow a ppx like [%bs.uncurry [@n]], we would allow creating this
33+
external functions dynamically.
34+
It can not reduce dependency on [Js_fn] though, since the type depends
35+
on it.
36+
Example:
37+
{[
38+
let v = [%bs.uncurry 3 f ]
39+
]}
40+
*)
41+
42+
43+
type + 'a t
44+
45+
external mk0 : (unit -> 'a0) -> 'a0 t =
46+
"js_fn_mk_00"
47+
48+
external run0 : 'a0 t -> 'a0 = "js_fn_run_00"
49+
50+
external mk1 : ('a0 -> 'a1) -> ('a0 * 'a1) t =
51+
"js_fn_mk_01"
52+
53+
external run1 : ('a0 * 'a1) t -> 'a0 -> 'a1 =
54+
"js_fn_run_01"
55+
56+
external mk2 : ('a0 -> 'a1 -> 'a2 ) -> ('a0 * 'a1 * 'a2) t =
57+
"js_fn_mk_02"
58+
59+
external run2 : ('a0 * 'a1 * 'a2 )t -> 'a0 -> 'a1 -> 'a2 =
60+
"js_fn_run_02"
61+
62+
external mk3 :
63+
('a0 -> 'a1 -> 'a2 -> 'a3 ) -> ('a0 * 'a1 * 'a2 * 'a3) t =
64+
"js_fn_mk_03"
65+
66+
external run3 :
67+
('a0 * 'a1 * 'a2 * 'a3) t -> 'a0 -> 'a1 -> 'a2 -> 'a3 =
68+
"js_fn_run_03"
69+
70+
external mk4 : ('a0 -> 'a1 -> 'a2 -> 'a3 -> 'a4 )
71+
-> ('a0 * 'a1 * 'a2 * 'a3 * 'a4) t =
72+
"js_fn_mk_04"
73+
74+
external run4 : ('a0 * 'a1 * 'a2 * 'a3 * 'a4) t ->
75+
'a0 -> 'a1 -> 'a2 -> 'a3 -> 'a4 =
76+
"js_fn_run_04"
77+
78+
external mk5 :
79+
('a0 -> 'a1 -> 'a2 -> 'a3 -> 'a4 -> 'a5 ) ->
80+
('a0 * 'a1 * 'a2 * 'a3 * 'a4 * 'a5) t =
81+
"js_fn_mk_05"
82+
83+
external run5 :
84+
('a0 * 'a1 * 'a2 * 'a3 * 'a4 * 'a5) t
85+
-> 'a0 -> 'a1 -> 'a2 -> 'a3 -> 'a4 -> 'a5 =
86+
"js_fn_run_05"
87+
88+
external mk6 : ('a0 -> 'a1 -> 'a2 -> 'a3 -> 'a4 -> 'a5 -> 'a6) ->
89+
('a0 * 'a1 * 'a2 * 'a3 * 'a4 * 'a5 * 'a6) t =
90+
"js_fn_mk_06"
91+
external run6 : ('a0 * 'a1 * 'a2 * 'a3 * 'a4 * 'a5 * 'a6) t
92+
-> 'a0 -> 'a1 -> 'a2 -> 'a3 -> 'a4 -> 'a5 -> 'a6 =
93+
"js_fn_run_06"
94+
95+
external mk7 : ('a0 -> 'a1 -> 'a2 -> 'a3 -> 'a4 -> 'a5 -> 'a6 -> 'a7) ->
96+
('a0 * 'a1 * 'a2 * 'a3 * 'a4 * 'a5 * 'a6 * 'a7 ) t =
97+
"js_fn_mk_07"
98+
99+
external run7 : ('a0 * 'a1 * 'a2 * 'a3 * 'a4 * 'a5 * 'a6 * 'a7 ) t
100+
-> 'a0 -> 'a1 -> 'a2 -> 'a3 -> 'a4 -> 'a5 -> 'a6 -> 'a7 =
101+
"js_fn_run_07"
102+
103+
external mk8 : ('a0 -> 'a1 -> 'a2 -> 'a3 -> 'a4 -> 'a5 -> 'a6 -> 'a7 -> 'a8 ) ->
104+
('a0 * 'a1 * 'a2 * 'a3 * 'a4 * 'a5 * 'a6 * 'a7 * 'a8 ) t =
105+
"js_fn_mk_08"
106+
107+
external run8 :
108+
('a0 * 'a1 * 'a2 * 'a3 * 'a4 * 'a5 * 'a6 * 'a7 * 'a8 ) t ->
109+
'a0 -> 'a1 -> 'a2 -> 'a3 -> 'a4 -> 'a5 -> 'a6 -> 'a7 -> 'a8
110+
=
111+
"js_fn_run_08"
112+
113+
external mk9 :
114+
('a0 -> 'a1 -> 'a2 -> 'a3 -> 'a4 -> 'a5 -> 'a6 -> 'a7 -> 'a8 -> 'a9) ->
115+
('a0 * 'a1 * 'a2 * 'a3 * 'a4 * 'a5 * 'a6 * 'a7 * 'a8 * 'a9 ) t =
116+
"js_fn_mk_09"
117+
118+
external run9 :
119+
('a0 * 'a1 * 'a2 * 'a3 * 'a4 * 'a5 * 'a6 * 'a7 * 'a8 * 'a9 ) t ->
120+
'a0 -> 'a1 -> 'a2 -> 'a3 -> 'a4 -> 'a5 -> 'a6 -> 'a7 -> 'a8 -> 'a9 =
121+
"js_fn_run_09"

jscomp/runtime/js.ml

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)