fs-api-0.3.0.1: Abstract interface for the file system
Safe HaskellSafe-Inferred
LanguageHaskell2010

System.FS.CRC

Description

Support for CRC

Synopsis

Wrap digest functionality

newtype CRC Source #

Constructors

CRC 

Fields

Instances

Instances details
Storable CRC Source # 
Instance details

Defined in System.FS.CRC

Methods

sizeOfCRCInt #

alignmentCRCInt #

peekElemOffPtr CRCIntIO CRC #

pokeElemOffPtr CRCIntCRCIO () #

peekByteOffPtr b → IntIO CRC #

pokeByteOffPtr b → IntCRCIO () #

peekPtr CRCIO CRC #

pokePtr CRCCRCIO () #

Generic CRC Source # 
Instance details

Defined in System.FS.CRC

Associated Types

type Rep CRCTypeType #

Methods

fromCRCRep CRC x #

toRep CRC x → CRC #

Show CRC Source # 
Instance details

Defined in System.FS.CRC

Methods

showsPrecIntCRCShowS #

showCRCString #

showList ∷ [CRC] → ShowS #

Eq CRC Source # 
Instance details

Defined in System.FS.CRC

Methods

(==)CRCCRCBool #

(/=)CRCCRCBool #

type Rep CRC Source # 
Instance details

Defined in System.FS.CRC

type Rep CRC = D1 ('MetaData "CRC" "System.FS.CRC" "fs-api-0.3.0.1-inplace" 'True) (C1 ('MetaCons "CRC" 'PrefixI 'True) (S1 ('MetaSel ('Just "getCRC") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word32)))

computeCRC ∷ ∀ a. CRC32 a ⇒ a → CRC Source #

updateCRC ∷ ∀ a. CRC32 a ⇒ a → CRCCRC Source #

File system functions with CRC functionality

hGetAllAtCRC Source #

Arguments

∷ ∀ m h. Monad m 
HasFS m h 
Handle h 
AbsOffset

The offset at which to read.

→ m (ByteString, CRC) 

Variation on hGetAllAt that also computes a CRC

hGetExactlyAtCRC Source #

Arguments

∷ ∀ m h. (HasCallStack, MonadThrow m) 
HasFS m h 
Handle h 
Word64

The number of bytes to read.

AbsOffset

The offset at which to read.

→ m (ByteString, CRC) 

Variation on hGetExactlyAt that also computes a CRC

hPutAllCRC ∷ ∀ m h. (HasCallStack, Monad m) ⇒ HasFS m h → Handle h → ByteString → m (Word64, CRC) Source #

Variation on hPutAll that also computes a CRC