-
Notifications
You must be signed in to change notification settings - Fork 464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
better handling M.q
#224
Merged
Merged
better handling M.q
#224
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,11 +3,13 @@ | |
|
||
var Caml_builtin_exceptions = require("../runtime/caml_builtin_exceptions"); | ||
var Caml_obj = require("../runtime/caml_obj"); | ||
var Bytes = require("./bytes"); | ||
var Caml_io = require("../runtime/caml_io"); | ||
var Pervasives = require("./pervasives"); | ||
var Buffer = require("./buffer"); | ||
var Caml_curry = require("../runtime/caml_curry"); | ||
var $$String = require("./string"); | ||
var Caml_string = require("../runtime/caml_string"); | ||
var CamlinternalFormat = require("./camlinternalFormat"); | ||
|
||
function add_queue(x, q) { | ||
|
@@ -670,7 +672,7 @@ function pp_print_bool(state, b) { | |
} | ||
|
||
function pp_print_char(state, c) { | ||
return pp_print_as(state, 1, $$String.make(1, c)); | ||
return pp_print_as(state, 1, Caml_string.bytes_to_string(Bytes.make(1, c))); | ||
} | ||
|
||
function pp_open_hbox(state, _) { | ||
|
@@ -1017,7 +1019,7 @@ function display_newline(state, _) { | |
return Caml_curry.app3(state[/* pp_out_string */16], "\n", 0, 1); | ||
} | ||
|
||
var blank_line = $$String.make(80, /* " " */32); | ||
var blank_line = Caml_string.bytes_to_string(Bytes.make(80, /* " " */32)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can be optimized as |
||
|
||
function display_blanks(state, _n) { | ||
while(true) { | ||
|
@@ -1593,7 +1595,7 @@ function output_acc(ppf, acc) { | |
return pp_print_as_size(ppf, size, s); | ||
case 2 : | ||
output_acc(ppf, p$1); | ||
return pp_print_as_size(ppf, size$1, $$String.make(1, c)); | ||
return pp_print_as_size(ppf, size$1, Caml_string.bytes_to_string(Bytes.make(1, c))); | ||
|
||
} | ||
} | ||
|
@@ -1787,7 +1789,7 @@ function strput_acc(ppf, acc) { | |
return pp_print_as_size(ppf, size, s); | ||
case 2 : | ||
strput_acc(ppf, p$1); | ||
return pp_print_as_size(ppf, size$1, $$String.make(1, c)); | ||
return pp_print_as_size(ppf, size$1, Caml_string.bytes_to_string(Bytes.make(1, c))); | ||
|
||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Caml_string.bytes_to_string @@ Bytes.make (1, ..)
can be optimized as (String.fromCharCode ...