-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Determine the size of runtime data structures -- -- heapsize is a tool to determine the size data structures. Determining -- the size of recursive data structures is supported. All sizes are in -- Bytes. @package heapsize @version 0.2.0 -- | Based on GHC.Datasize by Dennis Felsing module HeapSize -- | Calculate the recursive size of GHC objects in Bytes. Note that the -- actual size in memory is calculated, so shared values are only counted -- once. -- -- Call with recursiveSize $! 2 to force evaluation to WHNF -- before calculating the size. -- -- Call with recursiveSize $!! "foobar" ($!! from -- Control.DeepSeq) to force full evaluation before calculating the size. -- -- This function works very quickly on small data structures, but can be -- slow on large and complex ones. If speed is an issue it's probably -- possible to get the exact size of a small portion of the data -- structure and then estimate the total size from that. recursiveSize :: a -> Heapsize Int -- | Calculate the recursive size of GHC objects in Bytes after calling -- Control.DeepSeq.force on the data structure to force it into Normal -- Form. Using this function requires that the data structure has an -- NFData typeclass instance. recursiveSizeNF :: NFData a => a -> Heapsize Int -- | Get the *non-recursive* size of an closure in words closureSize :: a -> IO Int data Heapsize a runHeapsize :: Heapsize a -> IO (Maybe a) instance GHC.Show.Show HeapSize.Interrupted instance GHC.Show.Show HeapSize.HashableBox instance Control.Monad.Catch.MonadThrow HeapSize.Heapsize instance Control.Monad.Catch.MonadMask HeapSize.Heapsize instance Control.Monad.Catch.MonadCatch HeapSize.Heapsize instance Control.Monad.IO.Class.MonadIO HeapSize.Heapsize instance GHC.Base.Monad HeapSize.Heapsize instance GHC.Base.Functor HeapSize.Heapsize instance GHC.Base.Applicative HeapSize.Heapsize instance GHC.Classes.Eq HeapSize.HashableBox instance Data.Hashable.Class.Hashable HeapSize.HashableBox instance GHC.Exception.Type.Exception HeapSize.Interrupted