Skip to content

Commit

Permalink
Remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
tdammers committed May 22, 2023
1 parent 7374962 commit d5f5e28
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
2 changes: 0 additions & 2 deletions cardano-crypto-class/src/Cardano/Crypto/Libsodium/Memory.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ module Cardano.Crypto.Libsodium.Memory (
-- * MLocked allocations
mlockedMalloc,
MLockedAllocator (..),
AllocatorEvent(..),
getAllocatorEvent,

mlockedAlloca,
mlockedAllocaSized,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ module Cardano.Crypto.Libsodium.Memory.Internal (
-- * MLocked allocations
mlockedMalloc,
MLockedAllocator (..),
AllocatorEvent(..),
getAllocatorEvent,

mlockedAlloca,
mlockedAllocaSized,
Expand Down Expand Up @@ -207,15 +205,6 @@ packByteStringCStringLen :: MonadST m => CStringLen -> m ByteString
packByteStringCStringLen (ptr, len) =
withLiftST $ \lift -> lift . unsafeIOToST $ BS.packCStringLen (ptr, len)

data AllocatorEvent where
AllocatorEvent :: (Show e, Typeable e) => e -> AllocatorEvent

instance Show AllocatorEvent where
show (AllocatorEvent e) = "(AllocatorEvent " ++ show e ++ ")"

getAllocatorEvent :: forall e. Typeable e => AllocatorEvent -> Maybe e
getAllocatorEvent (AllocatorEvent e) = cast e

newtype MLockedAllocator m =
MLockedAllocator
{ mlAllocate :: forall a. CSize -> m (MLockedForeignPtr a)
Expand Down

0 comments on commit d5f5e28

Please sign in to comment.