Skip to content

Remove primes from foreign modules exports #36

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

Merged
merged 1 commit into from
Apr 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Node/Buffer/Immutable.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ exports.concat = function (buffs) {
return Buffer.concat(buffs);
};

exports["concat'"] = function (buffs) {
exports.concatToLength = function (buffs) {
return function (totalLength) {
return Buffer.concat(buffs, totalLength);
};
Expand Down
5 changes: 4 additions & 1 deletion src/Node/Buffer/Immutable.purs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,10 @@ foreign import concat :: Array ImmutableBuffer -> ImmutableBuffer

-- | Concatenates a list of buffers, combining them into a new buffer of the
-- | specified length.
foreign import concat' :: Array ImmutableBuffer -> Int -> ImmutableBuffer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move the doc-comment to the version of this we are going to export please?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well spotted! I just did that.

concat' :: Array ImmutableBuffer -> Int -> ImmutableBuffer
concat' = concatToLength

foreign import concatToLength :: Array ImmutableBuffer -> Int -> ImmutableBuffer

-- | Creates a new buffer slice that shares the memory of the original buffer.
foreign import slice :: Offset -> Offset -> ImmutableBuffer -> ImmutableBuffer
Expand Down