-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Measure allocations of a Haskell functions/values
--
-- Please see README.md
@package weigh
@version 0.0.2
-- | Framework for seeing how much a function allocates.
module Weigh
-- | Just run the measuring and print a report.
mainWith :: Weigh a -> IO ()
-- | Weigh specification monad.
data Weigh a
-- | How much a computation weighed in at.
data Weight
Weight :: !String -> !Int64 -> !Int64 -> Weight
[weightLabel] :: Weight -> !String
[weightAllocatedBytes] :: Weight -> !Int64
[weightGCs] :: Weight -> !Int64
-- | Weigh a function applied to an argument.
--
-- Implemented in terms of validateFunc.
func :: (NFData a) => String -> (b -> a) -> b -> Weigh ()
-- | Weigh a function applied to an argument.
--
-- Implemented in terms of validateFunc.
io :: (NFData a) => String -> (b -> IO a) -> b -> Weigh ()
-- | Weigh a value.
--
-- Implemented in terms of action.
value :: NFData a => String -> a -> Weigh ()
-- | Weigh an IO action.
--
-- Implemented in terms of validateAction.
action :: NFData a => String -> IO a -> Weigh ()
-- | Weigh an IO action, validating the result.
validateAction :: (NFData a) => String -> (b -> IO a) -> b -> (Weight -> Maybe String) -> Weigh ()
-- | Weigh a function, validating the result
validateFunc :: (NFData a) => String -> (b -> a) -> b -> (Weight -> Maybe String) -> Weigh ()
-- | Make a validator that set sthe maximum allocations.
maxAllocs :: Int64 -> (Weight -> Maybe String)
-- | Formatting an integral number to 1,000,000, etc.
commas :: (Num a, Integral a, Show a) => a -> String
instance GHC.Base.Applicative Weigh.Weigh
instance GHC.Base.Functor Weigh.Weigh
instance GHC.Base.Monad Weigh.Weigh
instance GHC.Show.Show Weigh.Weight
instance GHC.Read.Read Weigh.Weight