Hoogle Search
Within LTS Haskell 24.46 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
waitAnySTM :: [Async a] -> STM (Async a, a)lifted-async Control.Concurrent.Async.Lifted.Safe A version of waitAny that can be used inside an STM transaction.
sany :: Stream r ix e => (e -> Bool) -> Array r ix e -> Boolmassiv Data.Massiv.Vector Examples
_schemaAnyOf :: Schema -> Maybe [Referenced Schema]openapi3 Data.OpenApi No documentation available.
_schemaAnyOf :: Schema -> Maybe [Referenced Schema]openapi3 Data.OpenApi.Internal No documentation available.
-
openapi3 Data.OpenApi.Lens No documentation available.
matchAnyMessage :: FieldTypeDescriptor value -> Maybe (AnyMessageDescriptor value)proto-lens Data.ProtoLens.Message No documentation available.
many :: Alternative f => f a -> f [a]protolude Protolude Zero or more.
Examples
>>> many (putStr "la") lalalalalalalalala... * goes on forever *
>>> many Nothing Just []
>>> take 5 <$> many (Just 1) * hangs forever *
Note that this function can be used with Parsers based on Applicatives. In that case many parser will attempt to parse parser zero or more times until it fails.waitAny :: [Async a] -> IO (Async a, a)protolude Protolude Wait for any of the supplied Asyncs to complete. If the first to complete throws an exception, then that exception is re-thrown by waitAny. The input list must be non-empty. If multiple Asyncs complete or have completed, then the value returned corresponds to the first completed Async in the list.
waitAnyCancel :: [Async a] -> IO (Async a, a)protolude Protolude Like waitAny, but also cancels the other asynchronous operations as soon as one has completed.
waitAnyCatch :: [Async a] -> IO (Async a, Either SomeException a)protolude Protolude Wait for any of the supplied asynchronous operations to complete. The value returned is a pair of the Async that completed, and the result that would be returned by wait on that Async. The input list must be non-empty. If multiple Asyncs complete or have completed, then the value returned corresponds to the first completed Async in the list.