!{K      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJNone"#%,./17>HMPUVX_k membrainConstraint alias for K calculated by .membrainFType-level function to map memory units multipliers to proper symbols.:kind! UnitSymbol BitUnitSymbol Bit :: Symbol= "b":kind! UnitSymbol ByteUnitSymbol Byte :: Symbol= "B":kind! UnitSymbol KilobyteUnitSymbol Kilobyte :: Symbol= "kB":kind! UnitSymbol MebibyteUnitSymbol Mebibyte :: Symbol= "MiB"membrain(Term-level function to get value of the $ type family. Can be used only with -XTypeApplications.unitSymbol @Terabyte"TB"unitSymbol @Yobibyte"YiB"  None"#%,-./17;>EHMPX_k6membrainExistential data type for s.membrain6Main memory units type. It has phantom type parameter mem of kind Lo which is type level representation of the unit. Stores internally memory as bits. To construct values of type , use functions from the Membrain.Constructors module.membrainThis  function shows a  value as M. along with the measure unit suffix. It shows r losslessly while used with standardized units of measurements. The following mathematical law is used to display :8A decimal representation written with a repeating final 09 is supposed to terminate before these zeros. Instead of  1.585000... one simply writes 1.585p. The decimal is also called a terminating decimal. Terminating decimals represent rational numbers of the form  \cfrac{k}{2^n 5^m} /. If you use different forms of units then the N function for  hangs.%showMemory (Memory 22 :: Memory Byte)"2.75B"membrain Inverse of .readMemory @Byte "2.75B"Just (Memory {unMemory = 22})readMemory @Bit "2.75B"NothingmembrainCreates  of unit mem by the given O number. s smart constructor.memory @Byte 3Memory {unMemory = 24}membrain(Convert memory from one unit to another.Note:L this changes only view, not model. So this operation has zero runtime cost.*showMemory $ toMemory @Kilobyte $ byte 100"0.1kB"*showMemory $ toMemory @Kibibyte $ byte 100"0.09765625KiB"membrain Lossless  conversion to bits. Alias to .toBits $ byte 18toBits $ kilobyte 18000 membrain Lossless  conversion to rational number.toRat $ byte 44 % 1toRat $ toMemory @Byte $ bit 2211 % 4!membrainFloor T unit to integral number. This function may lose some information, so use only when: (You don't care about losing information.(You are sure that there will be no loss.floor $ byte 44floor $ toMemory @Byte $ bit 222"membrain%Returns the result of multiplication O with the given  valuememoryMul 2 (byte 4)Memory {unMemory = 64}#membrain(Returns the result of comparison of two 3 values and the difference between them as another  of the same unit.memoryDiff (bit 4) (bit 8)(LT,Memory {unMemory = 4})memoryDiff (byte 8) (byte 4)(GT,Memory {unMemory = 32})$memoryDiff (kilobyte 2) (kilobyte 2)(EQ,Memory {unMemory = 0})$membrain&Returns the result of addition of two ) values casted to the second memory unit.memoryPlus (bit 8) (megabyte 2)Memory {unMemory = 16000008}%membrain%Retuns the result of division of two  values of any units.memoryDiv (kilobyte 3) (byte 2)1500 % 1'membrainSemigroup over addition.byte 2 <> byte 5Memory {unMemory = 56} !"#$% !"#$%None"#%,/17MPX_kU.membrainCreates  in  s from given O as the number of bits.showMemory $ bit 42"42b"/membrainCreates  in  s from given O as the number of nibbles.showMemory $ nibble 42"42n"0membrainCreates  in  s from given O as the number of bytes.showMemory $ byte 42"42B"1membrainCreates  in  s from given O as the number of kilobytes.showMemory $ kilobyte 42"42kB"2membrainCreates  in  s from given O as the number of megabytes.showMemory $ megabyte 42"42MB"3membrainCreates  in  s from given O as the number of gigabytes.showMemory $ gigabyte 42"42GB"4membrainCreates  in  s from given O as the number of terabytes.showMemory $ terabyte 42"42TB"5membrainCreates  in   s from given O as the number of petabytes.showMemory $ petabyte 42"42PB"6membrainCreates  in   s from given O as the number of exabytes.showMemory $ exabyte 42"42EB"7membrainCreates  in   s from given O as the number of zettabytes.showMemory $ zettabyte 42"42ZB"8membrainCreates  in   s from given O as the number of yottabytes.showMemory $ yottabyte 42"42YB"9membrainCreates  in   s from given O as the number of kibibytes.showMemory $ kibibyte 42"42KiB":membrainCreates  in  s from given O as the number of mebibytes.showMemory $ mebibyte 42"42MiB";membrainCreates  in  s from given O as the number of gibibytes.showMemory $ gibibyte 42"42GiB"<membrainCreates  in  s from given O as the number of tebibytes.showMemory $ tebibyte 42"42TiB"=membrainCreates  in  s from given O as the number of pebibytes.showMemory $ pebibyte 42"42PiB">membrainCreates  in  s from given O as the number of exbibytes.showMemory $ exbibyte 42"42EiB"?membrainCreates  in  s from given O as the number of zebibytes.showMemory $ zebibyte 42"42ZiB"@membrainCreates  in  s from given O as the number of yobibytes.showMemory $ yobibyte 42"42YiB"./0123456789:;<=>?@./0123456789:;<=>?@None"#%,/17MPX_ky Amembrain^For a handle which attached to a physical file, the function returns the size of that file in s.Similar P from base6 but more type-safe: returns 'Memory Byte' instead of Q.BmembrainATruncates the physical file with the handle to the given size in s. Similar to R from baseB but more type-safe: it works with given 'Memory Byte' instead of Q.NOTE: This function makes !C under the hood, so be careful when working with the smaller units.CmembrainReturns the number of Ts in the type of the argument. The actual value of the argument is ignored. Returns S2 for types that do not have a fixed bitsize, like Q.Type safe version of the T function.bitSizeMaybe (0 :: Int)Just (Memory {unMemory = 64})bitSizeMaybe (0 :: Integer)NothingDmembraincReturn the number of bits in the type of the argument. The actual value of the argument is ignored.Type safe version of the U function.finiteBitSize FalseMemory {unMemory = 1}finiteBitSize (0 :: Int)Memory {unMemory = 64}EmembrainLike V4 but returns type-safe 'Memory Byte' instead of the W& which represents the amount of bytes.dComputes the storage requirements (in bytes) of the argument. The value of the argument is not used. sizeOf TrueMemory {unMemory = 32} sizeOf 'x'Memory {unMemory = 32}sizeOf (0 :: Int)Memory {unMemory = 64}sizeOf (0.0 :: Double)Memory {unMemory = 64}FmembrainfExecutes the computation, passing as argument a pointer to a temporarily allocated block of memory of n s. The block of memory is sufficiently aligned for any of the basic foreign types that fits into a memory block of the allocated size.The memory is freed when the computation terminates (either normally or via an exception), so the passed pointer must not be used after this. Similar to X but receives  s instead of W.Gmembrain3Allocates a block of memory of the given number of s. The block of memory is sufficiently aligned for any of the basic foreign types that fits into a memory block of the allocated size. Similar to Y but receives  s instead of W.HmembrainLlike G but memory is filled with s of value zero.ImembrainType safe version of the Z function. JmembrainType safe version of the [ function. ABCDEFGHIJ ABCDEFGHIJNone"#%,/17MPX_kzC  !"#$%./0123456789:;<=>?@ABCDEFGHIJ\      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUSTVPWXPYZP[F\]^P[GP_`PaHPaIPbJSTcPdKPdLPdNPeOf'membrain-0.0.0.0-DhMCfvovxLRErQzfBRPQR4Membrain.UnitsMembrain.MemoryMembrain.Constructors Membrain.BaseMembrainKnownUnitSymbol UnitSymbolYobibyteZebibyteExbibytePebibyteTebibyteGibibyteMebibyteKibibyte Yottabyte ZettabyteExabytePetabyteTerabyteGigabyteMegabyteKilobyteByteNibbleBit unitSymbol AnyMemory MkAnyMemoryMemoryunMemory showMemory readMemorymemorytoMemorytoBitstoRatfloor memoryMul memoryDiff memoryPlus memoryDiv$fMonoidMemory$fSemigroupMemory$fShowAnyMemory $fShowMemory $fReadMemory$fGenericMemory $fEqMemory $fOrdMemorybitnibblebytekilobytemegabytegigabyteterabytepetabyteexabyte zettabyte yottabytekibibytemebibytegibibytetebibytepebibyteexbibytezebibyteyobibyte hFileSize hSetFileSize bitSizeMaybe finiteBitSizesizeOf allocaBytes mallocBytes callocBytes reallocBytesmallocForeignPtrBytesbase GHC.TypeLits KnownSymbolghc-prim GHC.TypesNatDoubleGHC.Showshow GHC.NaturalNatural GHC.IO.Handle integer-gmpGHC.Integer.TypeInteger GHC.MaybeNothing Data.BitsForeign.StorableIntForeign.Marshal.AllocGHC.ForeignPtr