Hoogle Search

Within LTS Haskell 24.10 (ghc-9.10.2)

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

  1. allocAndFreeze :: ByteArray a => Int -> (Ptr p -> IO ()) -> a

    memory Data.ByteArray

    similar to alloc but hide the allocation and initializer in a pure context

  2. allocRet :: ByteArray ba => Int -> (Ptr p -> IO a) -> IO (a, ba)

    memory Data.ByteArray

    allocate n bytes and perform the given operation

  3. alloc :: forall (n :: Nat) ba p . (ByteArrayN n ba, KnownNat n) => (Ptr p -> IO ()) -> IO ba

    memory Data.ByteArray.Sized

    Allocate a new bytearray of specific size, and run the initializer on this memory

  4. allocAndFreeze :: forall (n :: Nat) ba p . (ByteArrayN n ba, KnownNat n) => (Ptr p -> IO ()) -> ba

    memory Data.ByteArray.Sized

    similar to allocN but hide the allocation and initializer in a pure context

  5. allocRet :: ByteArrayN n c => Proxy n -> (Ptr p -> IO a) -> IO (a, c)

    memory Data.ByteArray.Sized

    just like allocRet but with the size at the type level

  6. allM :: Monad m => (a -> m Bool) -> [a] -> m Bool

    extra Control.Monad.Extra

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

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

  7. allM :: (Foldable f, Monad m) => (a -> m Bool) -> f a -> m Bool

    extra Data.Foldable.Extra

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

  8. allSame :: Eq a => [a] -> Bool

    extra Data.List.Extra

    Are all elements the same.

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

  9. allM :: Monad m => (a -> m Bool) -> [a] -> m Bool

    extra Extra

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

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

  10. allSame :: Eq a => [a] -> Bool

    extra Extra

    Are all elements the same.

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

Page 78 of many | Previous | Next