HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulemono-traversable-1.0.21.0Haskell2010

Data.Containers

  • 7 classes
classclass (Monoid set, Semigroup set, MonoFoldable set, Eq (ContainerKey set), GrowingAppend set) => SetContainer set where
#

A container whose values are stored in Key-Value pairs.

Associated types

Methods

  • member :: ContainerKey set -> set -> Bool

    Check if there is a value with the supplied key in the container.

  • notMember :: ContainerKey set -> set -> Bool

    Check if there isn't a value with the supplied key in the container.

  • union :: set -> set -> set

    Get the union of two containers.

  • unions :: (MonoFoldable mono, Element mono ~ set) => mono -> set

    Combine a collection of SetContainers, with left-most values overriding when there are matching keys.

  • difference :: set -> set -> set

    Get the difference of two containers.

  • intersection :: set -> set -> set

    Get the intersection of two containers.

  • keys :: set -> [ContainerKey set]

    Get a list of all of the keys in the container.

Instances7SetContainer, …
classclass PolyMap (map :: Type -> Type) where
#

A guaranteed-polymorphic Map, which allows for more polymorphic versions of functions.

Methods

  • differenceMap :: map value1 -> map value2 -> map value1

    Get the difference between two maps, using the left map's values.

  • intersectionMap :: map value1 -> map value2 -> map value1

    Get the intersection of two maps, using the left map's values.

  • intersectionWithMap :: (value1 -> value2 -> value3) -> map value1 -> map value2 -> map value3

    Get the intersection of two maps with a supplied function that takes in the left map's value and the right map's value.

Instances3PolyMap
classclass (MonoTraversable map, SetContainer map) => IsMap map where
#

Polymorphic typeclass for interacting with different map types

Associated types

Methods

Instances4IsMap
  • Eq key => IsMap [(key, value)]Defined in mono-traversable-1.0.21.0 · Data.Containers
  • IsMap (IntMap value)Defined in mono-traversable-1.0.21.0 · Data.Containers

    This instance uses the functions from Data.IntMap.Strict.

  • Ord key => IsMap (Map key value)Defined in mono-traversable-1.0.21.0 · Data.Containers

    This instance uses the functions from Data.Map.Strict.

  • (Eq key, Hashable key) => IsMap (HashMap key value)Defined in mono-traversable-1.0.21.0 · Data.Containers

    This instance uses the functions from Data.HashMap.Strict.

classclass (SetContainer set, Element set ~ ContainerKey set) => IsSet set where
#

Polymorphic typeclass for interacting with different set types

Methods

Instances3IsSet
  • IsSet IntSetDefined in mono-traversable-1.0.21.0 · Data.Containers
  • Ord element => IsSet (Set element)Defined in mono-traversable-1.0.21.0 · Data.Containers
  • (Eq element, Hashable element) => IsSet (HashSet element)Defined in mono-traversable-1.0.21.0 · Data.Containers
classclass MonoFunctor mono => MonoZip mono where
#

Zip operations on MonoFunctors.

Methods

Instances4MonoZip
  • MonoZip ByteStringDefined in mono-traversable-1.0.21.0 · Data.Containers
  • MonoZip ByteStringDefined in mono-traversable-1.0.21.0 · Data.Containers
  • MonoZip TextDefined in mono-traversable-1.0.21.0 · Data.Containers
  • MonoZip TextDefined in mono-traversable-1.0.21.0 · Data.Containers
classclass SetContainer set => HasKeysSet set where
#

Type class for maps whose keys can be converted into sets.

Associated types

  • type family KeySet set

    Type of the key set.

Methods

  • keysSet :: set -> KeySet set

    Convert a map into a set of its keys.

Instances3HasKeysSet