fs-api-0.4.0.0: 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

sizeOf ∷ CRC → Int #

alignment ∷ CRC → Int #

peekElemOff ∷ Ptr CRC → Int → IO CRC #

pokeElemOff ∷ Ptr CRC → Int → CRC → IO () #

peekByteOff ∷ Ptr b → Int → IO CRC #

pokeByteOff ∷ Ptr b → Int → CRC → IO () #

peek ∷ Ptr CRC → IO CRC #

poke ∷ Ptr CRC → CRC → IO () #

Generic CRC Source # 
Instance details

Defined in System.FS.CRC

Associated Types

type Rep CRC ∷ Type → Type #

Methods

from ∷ CRC → Rep CRC x #

to ∷ Rep CRC x → CRC #

Show CRC Source # 
Instance details

Defined in System.FS.CRC

Methods

showsPrec ∷ Int → CRC → ShowS #

show ∷ CRC → String #

showList ∷ [CRC] → ShowS #

Eq CRC Source # 
Instance details

Defined in System.FS.CRC

Methods

(==) ∷ CRC → CRC → Bool #

(/=) ∷ CRC → CRC → Bool #

type Rep CRC Source # 
Instance details

Defined in System.FS.CRC

type Rep CRC = D1 ('MetaData "CRC" "System.FS.CRC" "fs-api-0.4.0.0-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 → CRC → CRC 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