Hoogle Search

Within LTS Haskell 24.36 (ghc-9.10.3)

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

  1. fromListWith :: (Ord k, MonoidNull v) => (v -> v -> v) -> [(k, v)] -> MonoidMap k v

    monoidmap Data.MonoidMap

    Constructs a MonoidMap from a list of key-value pairs, with a combining function for values. If the list contains more than one value for the same key, values are combined together in the order that they appear with the given combining function. Satisfies the following property for all possible keys k:

    get k (fromListWith f kvs) ==
    maybe mempty (foldl1 f)
    (nonEmpty (snd <$> filter ((== k) . fst) kvs))
    

  2. toList :: MonoidMap k v -> [(k, v)]

    monoidmap Data.MonoidMap

    Converts a MonoidMap to a list of key-value pairs, where the keys are in ascending order. The result only includes entries with values that are not null. Satisfies the following round-trip property:

    fromList (toList m) == m
    
    The resulting list is sorted in ascending key order:
    sortOn fst (toList m) == toList m
    

  3. ResList :: [ResolverValue m] -> ResolverValue (m :: Type -> Type)

    morpheus-graphql-app Data.Morpheus.App.Internal.Resolving

    No documentation available.

  4. mkList :: forall (m :: Type -> Type) . [ResolverValue m] -> ResolverValue m

    morpheus-graphql-app Data.Morpheus.App.Internal.Resolving

    No documentation available.

  5. fromList :: [a] -> Maybe (NonEmptyVector a)

    nonempty-vector Data.Vector.NonEmpty

    O(n) Convert from a list to a non-empty vector.

    >>> fromList [1..3]
    Just [1,2,3]
    
    >>> fromList []
    Nothing
    

  6. fromListN :: Int -> [a] -> Maybe (NonEmptyVector a)

    nonempty-vector Data.Vector.NonEmpty

    O(n) Convert the first n elements of a list to a non-empty vector. If the list is empty or <= 0 elements are chosen, Nothing is returned, otherwise Just containing the non-empty vector

    >>> fromListN 3 [1..5]
    Just [1,2,3]
    
    >>> fromListN 3 []
    Nothing
    
    >>> fromListN 0 [1..5]
    Nothing
    

  7. toList :: NonEmptyVector a -> [a]

    nonempty-vector Data.Vector.NonEmpty

    O(n) Convert from a non-empty vector to a list.

    >>> let nev :: NonEmptyVector Int = unsafeFromList [1..3] in toList nev
    [1,2,3]
    

  8. unsafeFromList :: [a] -> NonEmptyVector a

    nonempty-vector Data.Vector.NonEmpty

    O(n) Convert from a list to a non-empty vector. Warning: the onus is on the user to ensure that their vector is not empty, otherwise all bets are off!

    >>> unsafeFromList [1..3]
    [1,2,3]
    

  9. fromList :: Num p => [(p, a)] -> Categorical p a

    random-fu Data.Random.Distribution.Categorical

    Construct a Categorical distribution from a list of weighted categories.

  10. fromWeightedList :: (Fractional p, Eq p) => [(p, a)] -> Categorical p a

    random-fu Data.Random.Distribution.Categorical

    Construct a Categorical distribution from a list of weighted categories, where the weights do not necessarily sum to 1.

Page 149 of many | Previous | Next