Skip to content
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

Refactor MonadSodium into MonadMLock etc. #388

Closed
wants to merge 1 commit into from

Conversation

tdammers
Copy link
Contributor

This acknowledges the fact that by now, the MonadSodium typeclass is not really about libsodium anymore, and has become a kitchen sink of various concerns that we needed to abstract over in order to use mlocked memory and related functionality. Hence, we split up MonadSodium into a set of orthogonal typeclasses, each covering one of those concerns.

Specifically, the new typeclasses we introduce to replace MonadSodium are:

  • MonadMLock, covering mlocked memory operations
  • MonadByteStringMemory, covering access to raw memory in bytestrings (Data.ByteString.useAsCString etc.)
  • MonadPSB, covering the PinnedSizedBytes API
  • MonadUnmanagedMemory, covering memory allocations/deallocations outside of the Haskell heap (allocaBytes etc.)

@tdammers tdammers requested a review from lehins April 19, 2023 13:42
This was referenced Apr 19, 2023
@tdammers
Copy link
Contributor Author

Superseded by #404.

@tdammers tdammers closed this Aug 24, 2023
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.

1 participant