Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data InvertedMap v k
- null ∷ InvertedMap v k → Bool
- toMap ∷ Ord k ⇒ InvertedMap v k → Map k v
- unsafeInvertedMap ∷ Map v (NonEmpty k) → InvertedMap v k
- fromMap ∷ Ord v ⇒ Map k v → InvertedMap v k
- unsafeCoercion ∷ Coercion (InvertedMap v k) (Map v (NonEmpty k))
- spanAntitone ∷ (v → Bool) → InvertedMap v k → (InvertedMap v k, InvertedMap v k)
- minViewWithKey ∷ InvertedMap v k → Maybe ((v, NonEmpty k), InvertedMap v k)
InvertedMap type
data InvertedMap v k Source #
Instances
(Show v, Show k) ⇒ Show (InvertedMap v k) Source # | |
Defined in Test.Util.InvertedMap showsPrec ∷ Int → InvertedMap v k → ShowS # show ∷ InvertedMap v k → String # showList ∷ [InvertedMap v k] → ShowS # |
Query
null ∷ InvertedMap v k → Bool Source #
Construction
toMap ∷ Ord k ⇒ InvertedMap v k → Map k v Source #
This inverts the given InvertedMap
Inversion is an https://en.wikipedia.org/wiki/Involution_(mathematics), so
this returns to Map
.
unsafeInvertedMap ∷ Map v (NonEmpty k) → InvertedMap v k Source #
Conversion
unsafeCoercion ∷ Coercion (InvertedMap v k) (Map v (NonEmpty k)) Source #
Filter
spanAntitone ∷ (v → Bool) → InvertedMap v k → (InvertedMap v k, InvertedMap v k) Source #
Min/Max
minViewWithKey ∷ InvertedMap v k → Maybe ((v, NonEmpty k), InvertedMap v k) Source #