File tree Expand file tree Collapse file tree 4 files changed +7
-9
lines changed Expand file tree Collapse file tree 4 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -28,12 +28,12 @@ let stdin = Caml_undefined_extern.empty
28
28
29
29
type out_channel = {
30
30
mutable buffer : string ;
31
- output : out_channel -> string -> unit
31
+ output : ( out_channel -> string -> unit [ @ bs])
32
32
}
33
33
34
34
let stdout = {
35
35
buffer = " " ;
36
- output = (fun _ s ->
36
+ output = (fun [@ bs ] _ s ->
37
37
let module String = Caml_string_extern in
38
38
let v = Caml_string_extern. length s - 1 in
39
39
if [% bs.raw{| (typeof process != = " undefined" ) && process.stdout && process.stdout.write| }] then
@@ -46,7 +46,7 @@ let stdout = {
46
46
47
47
let stderr = {
48
48
buffer = " " ;
49
- output = fun _ s ->
49
+ output = fun [@ bs ] _ s ->
50
50
let module String = Caml_string_extern in
51
51
let v = Caml_string_extern. length s - 1 in
52
52
if s.[v] = '\n' then
@@ -71,7 +71,7 @@ let caml_ml_input_char (ic : in_channel) : char =
71
71
let caml_ml_flush (oc : out_channel ) : unit =
72
72
if oc.buffer <> " " then
73
73
begin
74
- oc.output oc oc.buffer;
74
+ oc.output oc oc.buffer [ @ bs] ;
75
75
oc.buffer < - " "
76
76
end
77
77
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ build runtime/caml_int32.cmj : cc_cmi runtime/caml_int32.ml | runtime/caml_int32
31
31
build runtime/caml_int32.cmi : cc runtime/caml_int32.mli | runtime/bs_stdlib_mini.cmi runtime/js.cmi runtime/js.cmj
32
32
build runtime/caml_int64.cmj : cc_cmi runtime/caml_int64.ml | runtime/caml_float.cmj runtime/caml_float_extern.cmj runtime/caml_int64.cmi runtime/caml_nativeint_extern.cmj runtime/caml_primitive.cmj runtime/caml_string_extern.cmj runtime/js.cmj
33
33
build runtime/caml_int64.cmi : cc runtime/caml_int64.mli | runtime/bs_stdlib_mini.cmi runtime/js.cmi runtime/js.cmj
34
- build runtime/caml_io.cmj : cc_cmi runtime/caml_io.ml | runtime/caml_io.cmi runtime/caml_string_extern.cmj runtime/caml_undefined_extern.cmj runtime/curry.cmj runtime/ js.cmj
34
+ build runtime/caml_io.cmj : cc_cmi runtime/caml_io.ml | runtime/caml_io.cmi runtime/caml_string_extern.cmj runtime/caml_undefined_extern.cmj runtime/js.cmj
35
35
build runtime/caml_io.cmi : cc runtime/caml_io.mli | runtime/bs_stdlib_mini.cmi runtime/caml_undefined_extern.cmj runtime/js.cmi runtime/js.cmj
36
36
build runtime/caml_lexer.cmj : cc_cmi runtime/caml_lexer.ml | runtime/caml_lexer.cmi
37
37
build runtime/caml_lexer.cmi : cc runtime/caml_lexer.mli | runtime/bs_stdlib_mini.cmi runtime/js.cmi runtime/js.cmj
Original file line number Diff line number Diff line change 1
1
2
2
3
- import * as Curry from "./curry.js" ;
4
3
5
4
var stdout = {
6
5
buffer : "" ,
@@ -34,7 +33,7 @@ var stderr = {
34
33
35
34
function caml_ml_flush ( oc ) {
36
35
if ( oc . buffer !== "" ) {
37
- Curry . _2 ( oc . output , oc , oc . buffer ) ;
36
+ oc . output ( oc , oc . buffer ) ;
38
37
oc . buffer = "" ;
39
38
return ;
40
39
}
Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
- var Curry = require ( "./curry.js" ) ;
4
3
5
4
var stdout = {
6
5
buffer : "" ,
@@ -34,7 +33,7 @@ var stderr = {
34
33
35
34
function caml_ml_flush ( oc ) {
36
35
if ( oc . buffer !== "" ) {
37
- Curry . _2 ( oc . output , oc , oc . buffer ) ;
36
+ oc . output ( oc , oc . buffer ) ;
38
37
oc . buffer = "" ;
39
38
return ;
40
39
}
You can’t perform that action at this time.
0 commit comments