Hoogle Search

Within LTS Haskell 24.6 (ghc-9.10.2)

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

  1. bisequence :: (Bitraversable t, Applicative f) => t (f a) (f b) -> f (t a b)

    relude Relude.Foldable.Reexport

    Sequences all the actions in a structure, building a new structure with the same shape using the results of the actions. For a version that ignores the results, see bisequence_.

    bisequencebitraverse id id
    

    Examples

    Basic usage:
    >>> bisequence (Just 4, Nothing)
    Nothing
    
    >>> bisequence (Just 4, Just 5)
    Just (4,5)
    
    >>> bisequence ([1, 2, 3], [4, 5])
    [(1,4),(1,5),(2,4),(2,5),(3,4),(3,5)]
    

  2. bisequence_ :: (Bifoldable t, Applicative f) => t (f a) (f b) -> f ()

    relude Relude.Foldable.Reexport

    Evaluate each action in the structure from left to right, and ignore the results. For a version that doesn't ignore the results, see bisequence.

    Examples

    Basic usage:
    >>> bisequence_ (print "Hello", print "World")
    "Hello"
    "World"
    
    >>> bisequence_ (Left (print "Hello"))
    "Hello"
    
    >>> bisequence_ (Right (print "World"))
    "World"
    

  3. subsequences :: [a] -> [[a]]

    relude Relude.List.Reexport

    The subsequences function returns the list of all subsequences of the argument.

    Laziness

    subsequences does not look ahead unless it must:
    >>> take 1 (subsequences undefined)
    [[]]
    
    >>> take 2 (subsequences ('a' : undefined))
    ["","a"]
    

    Examples

    >>> subsequences "abc"
    ["","a","b","ab","c","ac","bc","abc"]
    
    This function is productive on infinite inputs:
    >>> take 8 $ subsequences ['a'..]
    ["","a","b","ab","c","ac","bc","abc"]
    

  4. decodeSequenceLenIndef :: (r -> a -> r) -> r -> (r -> r') -> Decoder s a -> Decoder s r'

    serialise Codec.Serialise.Decoding

    Decode an indefinite sequence length.

  5. decodeSequenceLenN :: (r -> a -> r) -> r -> (r -> r') -> Int -> Decoder s a -> Decoder s r'

    serialise Codec.Serialise.Decoding

    Decode a sequence length.

  6. rsequenceInFields :: forall (f :: Type -> Type) (rs :: [(Symbol, Type)]) . (Functor f, AllFields rs, RMap rs) => Rec (f :. ElField) rs -> Rec ElField (MapTyCon f rs)

    vinyl Data.Vinyl

    Push an outer layer of interpretation functor into each named field.

  7. rsequenceInFields :: forall (f :: Type -> Type) (rs :: [(Symbol, Type)]) . (Functor f, AllFields rs, RMap rs) => Rec (f :. ElField) rs -> Rec ElField (MapTyCon f rs)

    vinyl Data.Vinyl.Class.Method

    Push an outer layer of interpretation functor into each named field.

  8. rsequenceIn :: forall (f :: Type -> Type) (g :: Type -> Type) (rs :: [Type]) . (Traversable f, Applicative g) => Rec (f :. g) rs -> Rec g (MapTyCon f rs)

    vinyl Data.Vinyl.Core

    Push an outer layer of interpretation functor into each field.

  9. sSequence :: forall (m :: Type -> Type) a (t1 :: t (m a)) . (STraversable t, SMonad m) => Sing t1 -> Sing (Apply (SequenceSym0 :: TyFun (t (m a)) (m (t a)) -> Type) t1)

    singletons-base Control.Monad.Singletons

    No documentation available.

  10. sSequence_ :: forall (t1 :: Type -> Type) (m :: Type -> Type) a (t2 :: t1 (m a)) . (SFoldable t1, SMonad m) => Sing t2 -> Sing (Apply (Sequence_Sym0 :: TyFun (t1 (m a)) (m ()) -> Type) t2)

    singletons-base Control.Monad.Singletons

    No documentation available.

Page 55 of many | Previous | Next