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.
-
sized Data.Sized Construct a Sized f n a by padding default value if the given list is short. Since 0.5.0.0 (type changed)
-
sized Data.Sized fromListWithDefault with the result length inferred. Since 0.7.0.0
fromListN :: Unbox a => Int -> [a] -> Array astreamly Streamly.Data.Array.Foreign Create an Array from the first N elements of a list. The array is allocated to size N, if the list terminates before N elements then the array may hold less than N elements.
fromListM :: (MonadAsync m, IsStream t) => [m a] -> t m astreamly Streamly.Internal.Data.Stream.IsStream >>> fromListM = Stream.fromFoldableM >>> fromListM = Stream.sequence . Stream.fromList >>> fromListM = Stream.mapM id . Stream.fromList >>> fromListM = Prelude.foldr Stream.consM Stream.nil
Construct a stream from a list of monadic actions. This is more efficient than fromFoldableM for serial streams.fromListM :: (MonadAsync m, IsStream t) => [m a] -> t m astreamly Streamly.Prelude >>> fromListM = Stream.fromFoldableM >>> fromListM = Stream.sequence . Stream.fromList >>> fromListM = Stream.mapM id . Stream.fromList >>> fromListM = Prelude.foldr Stream.consM Stream.nil
Construct a stream from a list of monadic actions. This is more efficient than fromFoldableM for serial streams.fromListWith :: Ord c => (a -> a -> a) -> [([c], a)] -> TMap c atrie-simple Data.Trie.Map No documentation available.
fromListN :: Unboxable a => Int -> [a] -> Vector aunboxing-vector Data.Vector.Unboxing No documentation available.
fromListPrefix :: forall (n :: Nat) a . SNatI n => [a] -> Maybe (Vec n a)vec Data.Vec.DataFamily.SpineStrict Convert list [a] to Vec n a. Returns Nothing if input list is too short.
>>> fromListPrefix "foo" :: Maybe (Vec N.Nat3 Char) Just ('f' ::: 'o' ::: 'o' ::: VNil)
>>> fromListPrefix "quux" :: Maybe (Vec N.Nat3 Char) Just ('q' ::: 'u' ::: 'u' ::: VNil)
>>> fromListPrefix "xy" :: Maybe (Vec N.Nat3 Char) Nothing
fromListPrefix :: forall (n :: Nat) a . SNatI n => [a] -> Maybe (Vec n a)vec Data.Vec.Lazy Convert list [a] to Vec n a. Returns Nothing if input list is too short.
>>> fromListPrefix "foo" :: Maybe (Vec N.Nat3 Char) Just ('f' ::: 'o' ::: 'o' ::: VNil)
>>> fromListPrefix "quux" :: Maybe (Vec N.Nat3 Char) Just ('q' ::: 'u' ::: 'u' ::: VNil)
>>> fromListPrefix "xy" :: Maybe (Vec N.Nat3 Char) Nothing
fromListPrefix :: forall (n :: Nat) a . SNatI n => [a] -> Maybe (Vec n a)vec Data.Vec.Lazy.Inline Convert list [a] to Vec n a. Returns Nothing if input list is too short.
>>> fromListPrefix "foo" :: Maybe (Vec N.Nat3 Char) Just ('f' ::: 'o' ::: 'o' ::: VNil)
>>> fromListPrefix "quux" :: Maybe (Vec N.Nat3 Char) Just ('q' ::: 'u' ::: 'u' ::: VNil)
>>> fromListPrefix "xy" :: Maybe (Vec N.Nat3 Char) Nothing