xrefcheck-0.3.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Xrefcheck.Verify

Synopsis

General verification

newtype VerifyResult e Source #

Constructors

VerifyResult [e] 

Instances

Instances details
Functor VerifyResult Source # 
Instance details

Defined in Xrefcheck.Verify

Methods

fmap :: (a -> b) -> VerifyResult a -> VerifyResult b #

(<$) :: a -> VerifyResult b -> VerifyResult a #

Monoid (VerifyResult e) Source # 
Instance details

Defined in Xrefcheck.Verify

Semigroup (VerifyResult e) Source # 
Instance details

Defined in Xrefcheck.Verify

Show e => Show (VerifyResult e) Source # 
Instance details

Defined in Xrefcheck.Verify

Eq e => Eq (VerifyResult e) Source # 
Instance details

Defined in Xrefcheck.Verify

verifying :: Monad m => ExceptT e m () -> m (VerifyResult e) Source #

data RetryAfter Source #

Constructors

Date UTCTime 
Seconds (Time Second) 

Instances

Instances details
Read RetryAfter Source # 
Instance details

Defined in Xrefcheck.Verify

Show RetryAfter Source # 
Instance details

Defined in Xrefcheck.Verify

Buildable RetryAfter Source # 
Instance details

Defined in Xrefcheck.Verify

Methods

build :: RetryAfter -> Builder #

Eq RetryAfter Source # 
Instance details

Defined in Xrefcheck.Verify

Concurrent traversal with caching

data NeedsCaching key Source #

Constructors

NoCaching 
CacheUnderKey key 

forConcurrentlyCaching :: forall a b cacheKey. Ord cacheKey => [a] -> (a -> NeedsCaching cacheKey) -> (a -> IO b) -> IO (Either (AsyncException, [b]) [b]) Source #

Perform concurrent traversal of the list with the caching mechanism. The function is semantically similar to Control.Concurrent.Async.forConcurrently; each asynchronous result of the action is prepended to the accumulator list [Async b]. Additionally, these action results may also be inserted in a map of the type Map cacheKey (Async b), depending on the return value of the function a -> NeedsCaching cacheKey applied to each of the element from the given list. If an element of the type a needs caching, and the value is already present in the map, then the action will not be executed, and the value is added to the accumulator list. After the whole list has been traversed, the accumulator is traversed once again to ensure every asynchronous action is completed. If interrupted by AsyncException, returns this exception and list of already calcualted results (their subset can be arbitrary). Computations that were not ended till this moment are cancelled.

Cross-references validation

newtype DomainName Source #

Contains a name of a domain, examples: DomainName "github.com", DomainName "localhost", DomainName "192.168.0.104"

Constructors

DomainName 

Fields