Hoogle Search

Within LTS Haskell 24.32 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. anyOf :: Getting Any s a -> (a -> Bool) -> s -> Bool

    microlens Lens.Micro

    Returns True if any value returned by a getter (any getter, including lenses, traversals, and folds) satisfies a predicate.

    >>> anyOf each (=='x') ['x','x']
    True
    
    >>> anyOf each (=='x') ['x','y']
    True
    
    >>> anyOf each (=='x') ['y','y']
    False
    

  2. anyByte :: ByteArray byteArray => Parser byteArray Word8

    memory Data.ByteArray.Parse

    Get the next byte from the parser

  3. anySingle :: MonadParsec e s m => m (Token s)

    megaparsec Text.Megaparsec

    Parse and return a single token. It's a good idea to attach a label to this parser.

    anySingle = satisfy (const True)
    
    See also: satisfy, anySingleBut.

  4. anySingleBut :: MonadParsec e s m => Token s -> m (Token s)

    megaparsec Text.Megaparsec

    Match any token but the given one. It's a good idea to attach a label to this parser.

    anySingleBut t = satisfy (/= t)
    
    See also: single, anySingle, satisfy.

  5. anyBE :: forall a e s m . (MonadParsec e s m, FiniteBits a, Num a, BinaryChunk (Tokens s)) => Maybe String -> m a

    megaparsec Text.Megaparsec.Byte.Binary

    Parse a big-endian number. You may wish to call this with a visible type application:

    number <- anyBE (Just "big-endian 32 bit word") @Word32
    

  6. anyLE :: forall a e s m . (MonadParsec e s m, FiniteBits a, Num a, BinaryChunk (Tokens s)) => Maybe String -> m a

    megaparsec Text.Megaparsec.Byte.Binary

    Parse a little-endian number. You may wish to call this with a visible type application:

    number <- anyLE (Just "little-endian 32 bit word") @Word32
    

  7. anyM :: Monad m => (a -> m Bool) -> [a] -> m Bool

    extra Control.Monad.Extra

    A version of any lifted to a monad. Retains the short-circuiting behaviour.

    anyM Just [False,True ,undefined] == Just True
    anyM Just [False,False,undefined] == undefined
    \(f :: Int -> Maybe Bool) xs -> anyM f xs == orM (map f xs)
    

  8. anyM :: (Foldable f, Monad m) => (a -> m Bool) -> f a -> m Bool

    extra Data.Foldable.Extra

    A generalization of anyM to Foldable instances. Retains the short-circuiting behaviour.

  9. anySame :: Eq a => [a] -> Bool

    extra Data.List.Extra

    Is there any element which occurs more than once.

    anySame [1,1,2] == True
    anySame [1,2,3] == False
    anySame (1:2:1:undefined) == True
    anySame [] == False
    \xs -> anySame xs == (length (nub xs) < length xs)
    

  10. anyM :: Monad m => (a -> m Bool) -> [a] -> m Bool

    extra Extra

    A version of any lifted to a monad. Retains the short-circuiting behaviour.

    anyM Just [False,True ,undefined] == Just True
    anyM Just [False,False,undefined] == undefined
    \(f :: Int -> Maybe Bool) xs -> anyM f xs == orM (map f xs)
    

Page 46 of many | Previous | Next