Hoogle Search
Within LTS Haskell 24.67 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
sequence :: (Traversable t, Monad m) => t (m a) -> m (t a)ghc-lib-parser GHC.Prelude.Basic Evaluate each monadic action in the structure from left to right, and collect the results. For a version that ignores the results see sequence_.
Examples
Basic usage: The first two examples are instances where the input and and output of sequence are isomorphic.>>> sequence $ Right [1,2,3,4] [Right 1,Right 2,Right 3,Right 4]
>>> sequence $ [Right 1,Right 2,Right 3,Right 4] Right [1,2,3,4]
The following examples demonstrate short circuit behavior for sequence.>>> sequence $ Left [1,2,3,4] Left [1,2,3,4]
>>> sequence $ [Left 0, Right 1,Right 2,Right 3,Right 4] Left 0
sequenceA :: (Traversable t, Applicative f) => t (f a) -> f (t a)ghc-lib-parser GHC.Prelude.Basic Evaluate each action in the structure from left to right, and collect the results. For a version that ignores the results see sequenceA_.
Examples
Basic usage: For the first two examples we show sequenceA fully evaluating a a structure and collecting the results.>>> sequenceA [Just 1, Just 2, Just 3] Just [1,2,3]
>>> sequenceA [Right 1, Right 2, Right 3] Right [1,2,3]
The next two example show Nothing and Just will short circuit the resulting structure if present in the input. For more context, check the Traversable instances for Either and Maybe.>>> sequenceA [Just 1, Just 2, Just 3, Nothing] Nothing
>>> sequenceA [Right 1, Right 2, Right 3, Left 4] Left 4
sequence_ :: (Foldable t, Monad m) => t (m a) -> m ()ghc-lib-parser GHC.Prelude.Basic Evaluate each monadic action in the structure from left to right, and ignore the results. For a version that doesn't ignore the results see sequence. sequence_ is just like sequenceA_, but specialised to monadic actions.
-
ghc-lib-parser GHC.Stg.InferTags.TagSig No documentation available.
-
ghc-lib-parser GHC.Stg.InferTags.TagSig No documentation available.
luRequired :: LinkableUnit -> Boolghc-lib-parser GHC.StgToJS.Types always link this unit
BlockedEquality :: ErrorItem -> TcSolverReportMsgghc-lib-parser GHC.Tc.Errors.Types An equality between two types is blocked on a kind equality between their kinds. Test cases: none.
DerivErrLangExtRequired :: Extension -> DeriveInstanceErrReasonghc-lib-parser GHC.Tc.Errors.Types No documentation available.
FunBindLacksEquations :: Name -> ConversionFailReasonghc-lib-parser GHC.Tc.Errors.Types No documentation available.
RepresentationalEq :: TyVarInfo -> Maybe CoercibleMsg -> CannotUnifyVariableReasonghc-lib-parser GHC.Tc.Errors.Types No documentation available.