ModuleCabal-syntax-3.12.1.0Haskell2010
Distribution.Compat.Binary
- 7 types
- 3 classes
- 17 values
- PackageCabal-syntax-3.12.1.0
- Exports27
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceBinary.hs
Lazily reconstruct a value previously written to a file.
The Binary class provides put and get, methods to encode and decode a Haskell value to a lazy ByteString. It mirrors the Read and Show classes for textual representation of Haskell types, and is suitable for serialising Haskell values to disk, over the network.
For decoding and generating simple external binary formats (e.g. C structures), Binary may be used, but in general is not suitable for complex protocols. Instead use the Put and Get primitives directly.
Instances of Binary should satisfy the following property:
decode . encode == idThat is, the get and put methods should be the inverse of each other. A range of instances are provided for basic Haskell types.
Instances168Binary, …
Binary OpenModuleDefined in Cabal-syntax-3.12.1.0 · Distribution.BackpackBinary OpenUnitIdDefined in Cabal-syntax-3.12.1.0 · Distribution.BackpackBinary CabalSpecVersionDefined in Cabal-syntax-3.12.1.0 · Distribution.CabalSpecVersionBinary AbiTagDefined in Cabal-syntax-3.12.1.0 · Distribution.CompilerBinary CompilerFlavorDefined in Cabal-syntax-3.12.1.0 · Distribution.CompilerBinary CompilerIdDefined in Cabal-syntax-3.12.1.0 · Distribution.CompilerBinary CompilerInfoDefined in Cabal-syntax-3.12.1.0 · Distribution.CompilerBinary LicenseDefined in Cabal-syntax-3.12.1.0 · Distribution.LicenseBinary ModuleNameDefined in Cabal-syntax-3.12.1.0 · Distribution.ModuleNameBinary PErrorDefined in Cabal-syntax-3.12.1.0 · Distribution.Parsec.ErrorBinary PositionDefined in Cabal-syntax-3.12.1.0 · Distribution.Parsec.PositionBinary PWarnTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Parsec.WarningBinary PWarningDefined in Cabal-syntax-3.12.1.0 · Distribution.Parsec.WarningBinary LicenseDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseBinary LicenseExceptionIdDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseExceptionIdBinary LicenseExpressionDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseExpressionBinary SimpleLicenseExpressionDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseExpressionBinary LicenseIdDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseIdBinary LicenseRefDefined in Cabal-syntax-3.12.1.0 · Distribution.SPDX.LicenseReferenceBinary ArchDefined in Cabal-syntax-3.12.1.0 · Distribution.SystemBinary OSDefined in Cabal-syntax-3.12.1.0 · Distribution.SystemBinary PlatformDefined in Cabal-syntax-3.12.1.0 · Distribution.SystemBinary AbiDependencyDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.AbiDependencyBinary AbiHashDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.AbiHashBinary BenchmarkDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.BenchmarkBinary BenchmarkInterfaceDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.BenchmarkInterfaceBinary BenchmarkTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.BenchmarkTypeBinary BuildInfoDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.BuildInfoBinary BuildTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.BuildTypeBinary ComponentDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ComponentBinary ComponentIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ComponentIdBinary ComponentNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ComponentNameBinary NotLibComponentNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ComponentNameBinary ComponentRequestedSpecDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ComponentRequestedSpecBinary ConfVarDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ConfVarBinary DependencyDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.DependencyBinary ExeDependencyDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ExeDependencyBinary ExecutableDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ExecutableBinary ExecutableScopeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ExecutableScopeBinary ExposedModuleDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ExposedModuleBinary FlagAssignmentDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.FlagBinary FlagNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.FlagBinary PackageFlagDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.FlagBinary ForeignLibDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ForeignLibBinary LibVersionInfoDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ForeignLibBinary ForeignLibOptionDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ForeignLibOptionBinary ForeignLibTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ForeignLibTypeBinary GenericPackageDescriptionDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.GenericPackageDescriptionBinary IncludeRenamingDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.IncludeRenamingBinary InstalledPackageInfoDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.InstalledPackageInfoBinary LegacyExeDependencyDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.LegacyExeDependencyBinary LibraryDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.LibraryBinary LibraryNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.LibraryNameBinary LibraryVisibilityDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.LibraryVisibilityBinary MixinDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.MixinBinary ModuleDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ModuleBinary ModuleReexportDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ModuleReexportBinary ModuleRenamingDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.ModuleRenamingBinary MungedPackageIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.MungedPackageIdBinary MungedPackageNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.MungedPackageNameBinary PackageDescriptionDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PackageDescriptionBinary PackageIdentifierDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PackageIdBinary PackageNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PackageNameBinary PackageVersionConstraintDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PackageVersionConstraintBinary PkgconfigDependencyDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PkgconfigDependencyBinary PkgconfigNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PkgconfigNameBinary PkgconfigVersionDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PkgconfigVersionBinary PkgconfigVersionRangeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.PkgconfigVersionRangeBinary SetupBuildInfoDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.SetupBuildInfoBinary KnownRepoTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.SourceRepoBinary RepoKindDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.SourceRepoBinary RepoTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.SourceRepoBinary SourceRepoDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.SourceRepoBinary TestSuiteDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.TestSuiteBinary TestSuiteInterfaceDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.TestSuiteInterfaceBinary TestTypeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.TestTypeBinary DefUnitIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.UnitIdBinary UnitIdDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.UnitIdBinary UnqualComponentNameDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.UnqualComponentNameBinary VersionDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.VersionBinary VersionRangeDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.VersionRange.InternalBinary ShortTextDefined in Cabal-syntax-3.12.1.0 · Distribution.Utils.ShortTextBinary ExtensionDefined in Cabal-syntax-3.12.1.0 · Language.Haskell.ExtensionBinary KnownExtensionDefined in Cabal-syntax-3.12.1.0 · Language.Haskell.ExtensionBinary LanguageDefined in Cabal-syntax-3.12.1.0 · Language.Haskell.ExtensionBinary ByteStringDefined in binary-0.8.9.3 · Data.Binary.ClassBinary ByteStringDefined in binary-0.8.9.3 · Data.Binary.ClassBinary ShortByteStringDefined in binary-0.8.9.3 · Data.Binary.ClassBinary IntSetDefined in binary-0.8.9.3 · Data.Binary.ClassBinary IntegerDefined in binary-0.8.9.3 · Data.Binary.ClassBinary NaturalDefined in binary-0.8.9.3 · Data.Binary.ClassBinary VoidDefined in binary-0.8.9.3 · Data.Binary.ClassBinary AllDefined in binary-0.8.9.3 · Data.Binary.ClassBinary AnyDefined in binary-0.8.9.3 · Data.Binary.ClassBinary SomeTypeRepDefined in binary-0.8.9.3 · Data.Binary.ClassBinary VersionDefined in binary-0.8.9.3 · Data.Binary.ClassBinary FingerprintDefined in binary-0.8.9.3 · Data.Binary.ClassBinary Int16Defined in binary-0.8.9.3 · Data.Binary.ClassBinary Int32Defined in binary-0.8.9.3 · Data.Binary.ClassBinary Int64Defined in binary-0.8.9.3 · Data.Binary.ClassBinary Int8Defined in binary-0.8.9.3 · Data.Binary.ClassBinary Word16Defined in binary-0.8.9.3 · Data.Binary.ClassBinary Word32Defined in binary-0.8.9.3 · Data.Binary.ClassBinary Word64Defined in binary-0.8.9.3 · Data.Binary.ClassBinary Word8Defined in binary-0.8.9.3 · Data.Binary.ClassBinary BoolDefined in binary-0.8.9.3 · Data.Binary.ClassBinary CharDefined in binary-0.8.9.3 · Data.Binary.ClassBinary DoubleDefined in binary-0.8.9.3 · Data.Binary.ClassUses non-IEEE754 encoding. Does not round-trip NaN.
Binary FloatDefined in binary-0.8.9.3 · Data.Binary.ClassUses non-IEEE754 encoding. Does not round-trip NaN.
Binary IntDefined in binary-0.8.9.3 · Data.Binary.ClassBinary KindRepDefined in binary-0.8.9.3 · Data.Binary.ClassBinary OrderingDefined in binary-0.8.9.3 · Data.Binary.ClassBinary RuntimeRepDefined in binary-0.8.9.3 · Data.Binary.ClassBinary TyConDefined in binary-0.8.9.3 · Data.Binary.ClassBinary TypeLitSortDefined in binary-0.8.9.3 · Data.Binary.ClassBinary VecCountDefined in binary-0.8.9.3 · Data.Binary.ClassBinary VecElemDefined in binary-0.8.9.3 · Data.Binary.ClassBinary WordDefined in binary-0.8.9.3 · Data.Binary.ClassBinary TextDefined in text-2.1.3 · Data.Text · orphanBinary TextDefined in text-2.1.3 · Data.Text.Lazy · orphanBinary ()Defined in binary-0.8.9.3 · Data.Binary.ClassBinary a => Binary (NonEmptySet a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Compat.NonEmptySetBinary a => Binary (Last' a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Compat.SemigroupBinary a => Binary (Option' a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Compat.SemigroupBinary a => Binary (PerCompilerFlavor a)Defined in Cabal-syntax-3.12.1.0 · Distribution.CompilerBinary a => Binary (Complex a)Defined in binary-0.8.9.3 · Data.Binary.ClassBinary a => Binary (First a)Defined in binary-0.8.9.3 · Data.Binary.ClassBinary a => Binary (Last a)Defined in binary-0.8.9.3 · Data.Binary.ClassBinary a => Binary (Max a)Defined in binary-0.8.9.3 · Data.Binary.ClassBinary a => Binary (Min a)Defined in binary-0.8.9.3 · Data.Binary.ClassBinary a => Binary (Set a)Defined in binary-0.8.9.3 · Data.Binary.ClassBinary a => Binary (NonEmpty a)Defined in binary-0.8.9.3 · Data.Binary.ClassBinary a => Binary (Identity a)Defined in binary-0.8.9.3 · Data.Binary.ClassBinary a => Binary (First a)Defined in binary-0.8.9.3 · Data.Binary.ClassBinary a => Binary (Last a)Defined in binary-0.8.9.3 · Data.Binary.ClassBinary a => Binary (Dual a)Defined in binary-0.8.9.3 · Data.Binary.ClassBinary a => Binary (Product a)Defined in binary-0.8.9.3 · Data.Binary.ClassBinary a => Binary (Sum a)Defined in binary-0.8.9.3 · Data.Binary.ClassBinary a => Binary (Maybe a)Defined in binary-0.8.9.3 · Data.Binary.ClassBinary a => Binary [a]Defined in binary-0.8.9.3 · Data.Binary.ClassBinary c => Binary (Condition c)Defined in Cabal-syntax-3.12.1.0 · Distribution.Types.ConditionBinary e => Binary (IntMap e)Defined in binary-0.8.9.3 · Data.Binary.ClassBinary e => Binary (Seq e)Defined in binary-0.8.9.3 · Data.Binary.ClassBinary e => Binary (Tree e)Defined in binary-0.8.9.3 · Data.Binary.ClassBinary m => Binary (WrappedMonoid m)Defined in binary-0.8.9.3 · Data.Binary.Class(IsNode a, Binary a, Show (Key a)) => Binary (Graph a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Compat.Graph(Binary a, Integral a) => Binary (Ratio a)Defined in binary-0.8.9.3 · Data.Binary.ClassStructured a => Binary (Tag a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Utils.StructuredBinary (SymbolicPath from to)Defined in Cabal-syntax-3.12.1.0 · Distribution.Utils.PathBinary (Fixed a)Defined in binary-0.8.9.3 · Data.Binary.ClassTypeable a => Binary (TypeRep a)Defined in binary-0.8.9.3 · Data.Binary.Class(Binary a, Binary b) => Binary (Arg a b)Defined in binary-0.8.9.3 · Data.Binary.Class(Binary a, Binary b) => Binary (Either a b)Defined in binary-0.8.9.3 · Data.Binary.Class(Binary a, Binary b) => Binary (a, b)Defined in binary-0.8.9.3 · Data.Binary.Class(Binary i, Ix i, Binary e) => Binary (Array i e)Defined in binary-0.8.9.3 · Data.Binary.Class(Binary i, Ix i, Binary e, IArray UArray e) => Binary (UArray i e)Defined in binary-0.8.9.3 · Data.Binary.Class(Binary k, Binary e) => Binary (Map k e)Defined in binary-0.8.9.3 · Data.Binary.ClassBinary (f a) => Binary (Alt f a)Defined in binary-0.8.9.3 · Data.Binary.Class(Binary a, Binary b, Binary c) => Binary (a, b, c)Defined in binary-0.8.9.3 · Data.Binary.Class(Binary v, Binary c, Binary a) => Binary (CondBranch v c a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Types.CondTree(Binary v, Binary c, Binary a) => Binary (CondTree v c a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Types.CondTree(Binary a, Binary b, Binary c, Binary d) => Binary (a, b, c, d)Defined in binary-0.8.9.3 · Data.Binary.Class(Binary a, Binary b, Binary c, Binary d, Binary e) => Binary (a, b, c, d, e)Defined in binary-0.8.9.3 · Data.Binary.Class(Binary a, Binary b, Binary c, Binary d, Binary e, Binary f) => Binary (a, b, c, d, e, f)Defined in binary-0.8.9.3 · Data.Binary.Class(Binary a, Binary b, Binary c, Binary d, Binary e, Binary f, Binary g) => Binary (a, b, c, d, e, f, g)Defined in binary-0.8.9.3 · Data.Binary.Class(Binary a, Binary b, Binary c, Binary d, Binary e, Binary f, Binary g, Binary h) => Binary (a, b, c, d, e, f, g, h)Defined in binary-0.8.9.3 · Data.Binary.Class(Binary a, Binary b, Binary c, Binary d, Binary e, Binary f, Binary g, Binary h, Binary i) => Binary (a, b, c, d, e, f, g, h, i)Defined in binary-0.8.9.3 · Data.Binary.Class(Binary a, Binary b, Binary c, Binary d, Binary e, Binary f, Binary g, Binary h, Binary i, Binary j) => Binary (a, b, c, d, e, f, g, h, i, j)Defined in binary-0.8.9.3 · Data.Binary.Class
Decode a value from a file. In case of success, the value will be returned in Right. In case of decoder errors, the error message together with the byte offset will be returned.
Decode a value from a lazy ByteString, reconstructing the original structure.
Instances33Bounded, Enum, Integral, Data, Num, Read, …
Bounded WordDefined in ghc-internal-9.1003.0 · GHC.Internal.EnumEnum WordDefined in ghc-internal-9.1003.0 · GHC.Internal.EnumEq WordDefined in ghc-prim-0.12.0 · GHC.ClassesIntegral WordDefined in ghc-internal-9.1003.0 · GHC.Internal.RealData WordDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.DataNum WordDefined in ghc-internal-9.1003.0 · GHC.Internal.NumOrd WordDefined in ghc-prim-0.12.0 · GHC.ClassesRead WordDefined in ghc-internal-9.1003.0 · GHC.Internal.ReadReal WordDefined in ghc-internal-9.1003.0 · GHC.Internal.RealShow WordDefined in ghc-internal-9.1003.0 · GHC.Internal.ShowIx WordDefined in ghc-internal-9.1003.0 · GHC.Internal.IxBits WordDefined in ghc-internal-9.1003.0 · GHC.Internal.BitsFiniteBits WordDefined in ghc-internal-9.1003.0 · GHC.Internal.BitsStorable WordDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.StorablePrintfArg WordDefined in base-4.20.2.0 · Text.PrintfNFData WordDefined in deepseq-1.5.0.0 · Control.DeepSeqBinary WordDefined in binary-0.8.9.3 · Data.Binary.ClassStructured WordDefined in Cabal-syntax-3.12.1.0 · Distribution.Utils.StructuredLift WordDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.SyntaxIArray UArray WordDefined in array-0.5.8.0 · Data.Array.BaseMArray IOUArray Word IODefined in array-0.5.8.0 · Data.Array.IO.InternalsGeneric1 (URec Word)Defined in ghc-internal-9.1003.0 · GHC.Internal.GenericsFoldable UWordDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.FoldableTraversable UWordDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.TraversableMArray (STUArray s) Word (ST s)Defined in array-0.5.8.0 · Data.Array.BaseFunctor (URec Word)Defined in ghc-internal-9.1003.0 · GHC.Internal.GenericsEq (URec Word p)Defined in ghc-internal-9.1003.0 · GHC.Internal.GenericsOrd (URec Word p)Defined in ghc-internal-9.1003.0 · GHC.Internal.GenericsShow (URec Word p)Defined in ghc-internal-9.1003.0 · GHC.Internal.GenericsGeneric (URec Word p)Defined in ghc-internal-9.1003.0 · GHC.Internal.Genericstype Rep (URec Word p) = D1 ('MetaDataDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics"URec"
"GHC.Internal.Generics"
"ghc-internal"
'False) (C1 ('MetaCons"UWord"
'PrefixI 'True) (S1 ('MetaSel ('Just"uWord#"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) UWord))type Rep1 (URec Word) = D1 ('MetaDataDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics"URec"
"GHC.Internal.Generics"
"ghc-internal"
'False) (C1 ('MetaCons"UWord"
'PrefixI 'True) (S1 ('MetaSel ('Just"uWord#"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) UWord))data URec WordDefined in ghc-internal-9.1003.0 · GHC.Internal.GenericsUsed for marking occurrences of Word#
64-bit unsigned integer type
Instances23Bounded, Enum, Eq, Integral, Data, Num, …
Bounded Word64Defined in ghc-internal-9.1003.0 · GHC.Internal.WordEnum Word64Defined in ghc-internal-9.1003.0 · GHC.Internal.WordEq Word64Defined in ghc-internal-9.1003.0 · GHC.Internal.WordIntegral Word64Defined in ghc-internal-9.1003.0 · GHC.Internal.WordData Word64Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.DataNum Word64Defined in ghc-internal-9.1003.0 · GHC.Internal.WordOrd Word64Defined in ghc-internal-9.1003.0 · GHC.Internal.WordRead Word64Defined in ghc-internal-9.1003.0 · GHC.Internal.ReadReal Word64Defined in ghc-internal-9.1003.0 · GHC.Internal.WordShow Word64Defined in ghc-internal-9.1003.0 · GHC.Internal.WordIx Word64Defined in ghc-internal-9.1003.0 · GHC.Internal.WordBits Word64Defined in ghc-internal-9.1003.0 · GHC.Internal.WordFiniteBits Word64Defined in ghc-internal-9.1003.0 · GHC.Internal.WordStorable Word64Defined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.StorablePrintfArg Word64Defined in base-4.20.2.0 · Text.PrintfNFData Word64Defined in deepseq-1.5.0.0 · Control.DeepSeqMantissa Word64Defined in bytestring-0.12.2.0 · Data.ByteString.Builder.RealFloat.InternalBinary Word64Defined in binary-0.8.9.3 · Data.Binary.ClassStructured Word64Defined in Cabal-syntax-3.12.1.0 · Distribution.Utils.StructuredLift Word64Defined in template-haskell-2.22.0.0 · Language.Haskell.TH.SyntaxIArray UArray Word64Defined in array-0.5.8.0 · Data.Array.BaseMArray IOUArray Word64 IODefined in array-0.5.8.0 · Data.Array.IO.InternalsMArray (STUArray s) Word64 (ST s)Defined in array-0.5.8.0 · Data.Array.Base
32-bit unsigned integer type
Instances23Bounded, Enum, Eq, Integral, Data, Num, …
Bounded Word32Defined in ghc-internal-9.1003.0 · GHC.Internal.WordEnum Word32Defined in ghc-internal-9.1003.0 · GHC.Internal.WordEq Word32Defined in ghc-internal-9.1003.0 · GHC.Internal.WordIntegral Word32Defined in ghc-internal-9.1003.0 · GHC.Internal.WordData Word32Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.DataNum Word32Defined in ghc-internal-9.1003.0 · GHC.Internal.WordOrd Word32Defined in ghc-internal-9.1003.0 · GHC.Internal.WordRead Word32Defined in ghc-internal-9.1003.0 · GHC.Internal.ReadReal Word32Defined in ghc-internal-9.1003.0 · GHC.Internal.WordShow Word32Defined in ghc-internal-9.1003.0 · GHC.Internal.WordIx Word32Defined in ghc-internal-9.1003.0 · GHC.Internal.WordBits Word32Defined in ghc-internal-9.1003.0 · GHC.Internal.WordFiniteBits Word32Defined in ghc-internal-9.1003.0 · GHC.Internal.WordStorable Word32Defined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.StorablePrintfArg Word32Defined in base-4.20.2.0 · Text.PrintfNFData Word32Defined in deepseq-1.5.0.0 · Control.DeepSeqMantissa Word32Defined in bytestring-0.12.2.0 · Data.ByteString.Builder.RealFloat.InternalBinary Word32Defined in binary-0.8.9.3 · Data.Binary.ClassStructured Word32Defined in Cabal-syntax-3.12.1.0 · Distribution.Utils.StructuredLift Word32Defined in template-haskell-2.22.0.0 · Language.Haskell.TH.SyntaxIArray UArray Word32Defined in array-0.5.8.0 · Data.Array.BaseMArray IOUArray Word32 IODefined in array-0.5.8.0 · Data.Array.IO.InternalsMArray (STUArray s) Word32 (ST s)Defined in array-0.5.8.0 · Data.Array.Base
16-bit unsigned integer type
Instances22Bounded, Enum, Eq, Integral, Data, Num, …
Bounded Word16Defined in ghc-internal-9.1003.0 · GHC.Internal.WordEnum Word16Defined in ghc-internal-9.1003.0 · GHC.Internal.WordEq Word16Defined in ghc-internal-9.1003.0 · GHC.Internal.WordIntegral Word16Defined in ghc-internal-9.1003.0 · GHC.Internal.WordData Word16Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.DataNum Word16Defined in ghc-internal-9.1003.0 · GHC.Internal.WordOrd Word16Defined in ghc-internal-9.1003.0 · GHC.Internal.WordRead Word16Defined in ghc-internal-9.1003.0 · GHC.Internal.ReadReal Word16Defined in ghc-internal-9.1003.0 · GHC.Internal.WordShow Word16Defined in ghc-internal-9.1003.0 · GHC.Internal.WordIx Word16Defined in ghc-internal-9.1003.0 · GHC.Internal.WordBits Word16Defined in ghc-internal-9.1003.0 · GHC.Internal.WordFiniteBits Word16Defined in ghc-internal-9.1003.0 · GHC.Internal.WordStorable Word16Defined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.StorablePrintfArg Word16Defined in base-4.20.2.0 · Text.PrintfNFData Word16Defined in deepseq-1.5.0.0 · Control.DeepSeqBinary Word16Defined in binary-0.8.9.3 · Data.Binary.ClassStructured Word16Defined in Cabal-syntax-3.12.1.0 · Distribution.Utils.StructuredLift Word16Defined in template-haskell-2.22.0.0 · Language.Haskell.TH.SyntaxIArray UArray Word16Defined in array-0.5.8.0 · Data.Array.BaseMArray IOUArray Word16 IODefined in array-0.5.8.0 · Data.Array.IO.InternalsMArray (STUArray s) Word16 (ST s)Defined in array-0.5.8.0 · Data.Array.Base
8-bit unsigned integer type
Instances22Bounded, Enum, Eq, Integral, Data, Num, …
Bounded Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.WordEnum Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.WordEq Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.WordIntegral Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.WordData Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.DataNum Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.WordOrd Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.WordRead Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.ReadReal Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.WordShow Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.WordIx Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.WordBits Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.WordFiniteBits Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.WordStorable Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.StorablePrintfArg Word8Defined in base-4.20.2.0 · Text.PrintfNFData Word8Defined in deepseq-1.5.0.0 · Control.DeepSeqBinary Word8Defined in binary-0.8.9.3 · Data.Binary.ClassStructured Word8Defined in Cabal-syntax-3.12.1.0 · Distribution.Utils.StructuredLift Word8Defined in template-haskell-2.22.0.0 · Language.Haskell.TH.SyntaxIArray UArray Word8Defined in array-0.5.8.0 · Data.Array.BaseMArray IOUArray Word8 IODefined in array-0.5.8.0 · Data.Array.IO.InternalsMArray (STUArray s) Word8 (ST s)Defined in array-0.5.8.0 · Data.Array.Base
Instances6GBinaryGet
GBinaryGet U1Defined in binary-0.8.9.3 · Data.Binary.Generic · orphanGBinaryGet V1Defined in binary-0.8.9.3 · Data.Binary.Generic · orphanBinary a => GBinaryGet (K1 i a)Defined in binary-0.8.9.3 · Data.Binary.Generic · orphan(GBinaryGet a, GBinaryGet b) => GBinaryGet (a :*: b)Defined in binary-0.8.9.3 · Data.Binary.Generic · orphan(GSumGet a, GSumGet b, SumSize a, SumSize b) => GBinaryGet (a :+: b)Defined in binary-0.8.9.3 · Data.Binary.Generic · orphanGBinaryGet a => GBinaryGet (M1 i c a)Defined in binary-0.8.9.3 · Data.Binary.Generic · orphan
Instances6GBinaryPut
GBinaryPut U1Defined in binary-0.8.9.3 · Data.Binary.Generic · orphanGBinaryPut V1Defined in binary-0.8.9.3 · Data.Binary.Generic · orphanBinary a => GBinaryPut (K1 i a)Defined in binary-0.8.9.3 · Data.Binary.Generic · orphan(GBinaryPut a, GBinaryPut b) => GBinaryPut (a :*: b)Defined in binary-0.8.9.3 · Data.Binary.Generic · orphan(GSumPut a, GSumPut b, SumSize a, SumSize b) => GBinaryPut (a :+: b)Defined in binary-0.8.9.3 · Data.Binary.Generic · orphanGBinaryPut a => GBinaryPut (M1 i c a)Defined in binary-0.8.9.3 · Data.Binary.Generic · orphan
Read a Word8 from the monad state
Instances6Monad, Functor, MonadFail, Applicative, Alternative, MonadPlus
Monad GetDefined in binary-0.8.9.3 · Data.Binary.Get.InternalFunctor GetDefined in binary-0.8.9.3 · Data.Binary.Get.InternalMonadFail GetDefined in binary-0.8.9.3 · Data.Binary.Get.InternalApplicative GetDefined in binary-0.8.9.3 · Data.Binary.Get.InternalAlternative GetDefined in binary-0.8.9.3 · Data.Binary.Get.InternalMonadPlus GetDefined in binary-0.8.9.3 · Data.Binary.Get.Internal
Put merely lifts Builder into a Writer monad, applied to ().
Efficiently write a byte into the output buffer
Decode a value from a file. In case of errors, error will be called with the error message.
Encode a value using binary serialisation to a lazy ByteString.
Lazily serialise a value to a file.
This is just a convenience function, it's defined simply as:
encodeFile f = B.writeFile f . encodeSo for example if you wanted to compress as well, you could use:
B.writeFile f . compress . encodeReverse the order of the bits in a Word16.
Reverse the order of the bits in a Word32.
Reverse the order of the bits in a Word64.
Reverse the order of the bits in a Word8.
Reverse order of bytes in Word16.
Reverse order of bytes in Word32.
Reverse order of bytes in Word64.