Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Provides the UniqueSeq
type.
Synopsis
- data UniqueSeq a where
- UnsafeUniqueSeq { }
- pattern MkUniqueSeq :: Seq a -> HashSet a -> UniqueSeq a
- fromFoldable :: (Foldable f, Hashable a) => f a -> UniqueSeq a
- prepend :: Hashable a => a -> UniqueSeq a -> UniqueSeq a
- append :: Hashable a => UniqueSeq a -> a -> UniqueSeq a
- union :: forall a. Hashable a => UniqueSeq a -> UniqueSeq a -> UniqueSeq a
- insertSeq :: Hashable a => (a -> Seq a -> Seq a) -> a -> UniqueSeq a -> UniqueSeq a
- notHSetMember :: Hashable a => a -> HashSet a -> Bool
Type
Like Seq
but with the guarantee that all elements are unique. This
comes with the cost of O(2n) space.
pattern MkUniqueSeq :: Seq a -> HashSet a -> UniqueSeq a |