Skip to content

Conversation

JordanMartinez
Copy link
Contributor

Description of the change

Fixes #34


Checklist:

  • Added the change to the changelog's "Unreleased" section with a reference to this PR (e.g. "- Made a change (#0000)")
  • Linked any existing issues or proposals that this pull request should close
  • Updated or added relevant documentation
  • Added a test for the contribution (if applicable)

create :: Int -> Effect Buffer
create = usingToImmutable Immutable.create

foreign import copyAll :: forall a buf m. a -> m buf
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note: this was used to implement both freeze and thaw.

Copy link
Member

Choose a reason for hiding this comment

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

👍 I generally think replacing functions like this with FFI for separate operations is better as it makes the interface more portable. Probably doesn't really apply to -node-buffer, but just thought I'd throw it out there! 😄

@JordanMartinez
Copy link
Contributor Author

@thomashoneyman 🏓

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use Effect.Uncurried for FFI

3 participants