-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Human friendly conversion between byte units (KB, MB, GB...) -- -- Human friendly conversion between byte units (KB, MB, GB...)... @package byteunits @version 0.3.0.2 module Data.ByteUnits data ByteUnit Bytes :: ByteUnit KiloBytes :: ByteUnit MegaBytes :: ByteUnit GigaBytes :: ByteUnit TeraBytes :: ByteUnit PetaBytes :: ByteUnit ExaBytes :: ByteUnit data ByteValue ByteValue :: Float -> ByteUnit -> ByteValue -- | Gets the value of bytes from a ByteValue type getBytes :: ByteValue -> Float -- | Converts the ByteValue to an ByteValue with the specified ByteUnit convertByteUnit :: ByteValue -> ByteUnit -> ByteValue -- | Converts to the largest unit size provided the float value is > 1 -- --
--   >>> getAppropriateUnits (ByteValue 1024 Bytes)
--   ByteValue 1 KiloBytes
--   
-- --
--   >>> getAppropriateUnits (ByteValue (3.5 * 1024* 1024) Bytes)
--   ByteValue 3.5 MegaBytes
--   
getAppropriateUnits :: ByteValue -> ByteValue getShortHand :: ByteValue -> String instance GHC.Classes.Eq Data.ByteUnits.ByteValue instance GHC.Show.Show Data.ByteUnits.ByteValue instance GHC.Classes.Eq Data.ByteUnits.ByteUnit instance GHC.Show.Show Data.ByteUnits.ByteUnit