Hoogle Search

Within LTS Haskell 24.45 (ghc-9.10.3)

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

  1. toMap :: NEMap k a -> Map k a

    nonempty-containers Data.Map.NonEmpty.Internal

    O(log n). Convert a non-empty map back into a normal possibly-empty map, for usage with functions that expect Map. Can be thought of as "obscuring" the non-emptiness of the map in its type. See the IsNotEmpty pattern. nonEmptyMap and maybe empty toMap form an isomorphism: they are perfect structure-preserving inverses of eachother.

    toMap (fromList ((3,"a") :| [(5,"b")])) == Data.Map.fromList [(3,"a"), (5,"b")]
    

  2. foldMapWithIndex :: Semigroup m => (Int -> a -> m) -> NESeq a -> m

    nonempty-containers Data.Sequence.NonEmpty

    O(n). A generalization of foldMap1, foldMapWithIndex takes a folding function that also depends on the element's index, and applies it to every element in the sequence.

  3. foldMapWithIndex :: Semigroup m => (Int -> a -> m) -> NESeq a -> m

    nonempty-containers Data.Sequence.NonEmpty.Internal

    O(n). A generalization of foldMap1, foldMapWithIndex takes a folding function that also depends on the element's index, and applies it to every element in the sequence.

  4. combineDMapsWithKey :: GCompare f => (forall (a :: k) . () => f a -> These (g a) (h a) -> i a) -> DMap f g -> DMap f h -> DMap f i

    patch Data.Functor.Misc

    Union two DMaps of different types, yielding another type. Each key that is present in either input map will be present in the output.

  5. dmapToIntMap :: DMap (Const2 Key v) Identity -> IntMap v

    patch Data.Functor.Misc

    Convert a DMap to an IntMap

  6. dmapToMap :: DMap (Const2 k v) Identity -> Map k v

    patch Data.Functor.Misc

    Convert a DMap to a regular Map

  7. dmapToThese :: DMap (EitherTag a b) Identity -> Maybe (These a b)

    patch Data.Functor.Misc

    Extract the values of a DMap of EitherTags.

  8. newtype PatchDMap (k1 :: k -> Type) (v :: k -> Type)

    patch Data.Patch

    A set of changes to a DMap. Any element may be inserted/updated or deleted. Insertions are represented as ComposeMaybe (Just value), while deletions are represented as ComposeMaybe Nothing.

  9. PatchDMap :: DMap k1 (ComposeMaybe v) -> PatchDMap (k1 :: k -> Type) (v :: k -> Type)

    patch Data.Patch

    No documentation available.

  10. data PatchDMapWithMove (k1 :: k -> Type) (v :: k -> Type)

    patch Data.Patch

    Like PatchMapWithMove, but for DMap. Each key carries a NodeInfo which describes how it will be changed by the patch and connects move sources and destinations. Invariants:

    • A key should not move to itself.
    • A move should always be represented with both the destination key (as a From_Move) and the source key (as a ComposeMaybe (Just destination))

Page 960 of many | Previous | Next