packages feed

heapsize 0.2.0 → 0.3.0

raw patch · 2 files changed

+3/−6 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

- HeapSize: runHeapsize :: Heapsize a -> IO (Maybe a)
+ HeapSize: runHeapsize :: Int -> Heapsize a -> IO (Maybe a)

Files

heapsize.cabal view
@@ -1,6 +1,6 @@ cabal-version:      3.0 name:               heapsize-version:            0.2.0+version:            0.3.0 license:            BSD-3-Clause license-file:       LICENSE category:           GHC, Debug, Development
src/HeapSize.hs view
@@ -89,14 +89,11 @@   { _unHeapsize :: ReaderT HeapsizeState (MaybeT IO) a}   deriving (Applicative, Functor, Monad, MonadIO, MonadCatch, MonadMask, MonadThrow) -initSize :: Int-initSize = 10000000- --   A garbage collection is performed before the size is calculated, because --   the garbage collector would make heap walks difficult. --   Returns `Nothing` if the count is interrupted by a garbage collection-runHeapsize :: Heapsize a -> IO (Maybe a)-runHeapsize (Heapsize comp) = do+runHeapsize :: Int -> Heapsize a -> IO (Maybe a)+runHeapsize initSize (Heapsize comp) = do    -- initialize the mutable state   !closuresSeen <- HT.newSized initSize