HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulerio-0.1.22.0Haskell2010

RIO.Set.Unchecked

This module contains functions from Data.Set that have unchecked preconditions on their input. If these preconditions are not satisfied, the data structure may end up in an invalid state and other operations may misbehave. Import as:

import qualified RIO.Set.Unchecked as Set'
  • 5 values
  • Packagerio-0.1.22.0
  • Exports5
  • LanguageHaskell2010
  • LicenceMIT
  • SourceUnchecked.hs

Map

1 declaration
valuemapMonotonic :: (a -> b) -> Set a -> Set b
#

O(n). The

mapMonotonic f s == map f s, but works only when f is strictly increasing. The precondition is not checked. Semi-formally, we have:

and [x < y ==> f x < f y | x <- ls, y <- ls]
                    ==> mapMonotonic f s == map f s
    where ls = toList s

Ordered list

4 declarations
valuefromAscList :: Eq a => [a] -> Set a
#

O(n). Build a set from an ascending list in linear time. The precondition (input list is ascending) is not checked.

valuefromDescList :: Eq a => [a] -> Set a
#

O(n). Build a set from a descending list in linear time. The precondition (input list is descending) is not checked.

valuefromDistinctAscList :: [a] -> Set a
#

O(n). Build a set from an ascending list of distinct elements in linear time. The precondition (input list is strictly ascending) is not checked.

valuefromDistinctDescList :: [a] -> Set a
#

O(n). Build a set from a descending list of distinct elements in linear time. The precondition (input list is strictly descending) is not checked.