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. fromListWithDefault :: forall (f :: Type -> Type) (n :: Nat) a . (Dom f a, CFreeMonoid f) => SNat n -> a -> [a] -> Sized f n a

    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)

  2. fromListWithDefault' :: forall (f :: Type -> Type) (n :: Nat) a . (KnownNat n, CFreeMonoid f, Dom f a) => a -> [a] -> Sized f n a

    sized Data.Sized

    fromListWithDefault with the result length inferred. Since 0.7.0.0

  3. fromListN :: Unbox a => Int -> [a] -> Array a

    streamly 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.

  4. fromListM :: (MonadAsync m, IsStream t) => [m a] -> t m a

    streamly 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.

  5. fromListM :: (MonadAsync m, IsStream t) => [m a] -> t m a

    streamly 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.

  6. fromListWith :: Ord c => (a -> a -> a) -> [([c], a)] -> TMap c a

    trie-simple Data.Trie.Map

    No documentation available.

  7. fromListN :: Unboxable a => Int -> [a] -> Vector a

    unboxing-vector Data.Vector.Unboxing

    No documentation available.

  8. 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
    

  9. 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
    

  10. 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
    

Page 61 of many | Previous | Next