Skip to content

Commit 2582800

Browse files
authored
Additional exports from Data.Set.Internal (#1178)
1 parent 5669b01 commit 2582800

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

containers/src/Data/Set/Internal.hs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,11 @@ module Data.Set.Internal (
225225
, balanced
226226
, link
227227
, merge
228+
, balanceL
229+
, balanceR
230+
, glue
231+
, insertMin
232+
, insertMax
228233
) where
229234

230235
import Utils.Containers.Internal.Prelude hiding
@@ -1741,13 +1746,16 @@ linkR_ x !lsz l r = case r of
17411746
Tip -> Bin (1+lsz) x l Tip
17421747

17431748
-- insertMin and insertMax don't perform potentially expensive comparisons.
1744-
insertMax,insertMin :: a -> Set a -> Set a
1749+
-- @since FIXME
1750+
insertMax :: a -> Set a -> Set a
17451751
insertMax x t
17461752
= case t of
17471753
Tip -> singleton x
17481754
Bin _ y l r
17491755
-> balanceR y l (insertMax x r)
17501756

1757+
-- @since FIXME
1758+
insertMin :: a -> Set a -> Set a
17511759
insertMin x t
17521760
= case t of
17531761
Tip -> singleton x
@@ -1783,6 +1791,7 @@ mergeR_ !lsz l r = case r of
17831791
[glue l r]: glues two trees together.
17841792
Assumes that [l] and [r] are already balanced with respect to each other.
17851793
--------------------------------------------------------------------}
1794+
-- @since FIXME
17861795
glue :: Set a -> Set a -> Set a
17871796
glue Tip r = r
17881797
glue l Tip = l
@@ -1926,6 +1935,7 @@ ratio = 2
19261935

19271936
-- balanceL is called when left subtree might have been inserted to or when
19281937
-- right subtree might have been deleted from.
1938+
-- @since FIXME
19291939
balanceL :: a -> Set a -> Set a -> Set a
19301940
balanceL x l r = case (l, r) of
19311941
(Bin ls _ _ _, Bin rs _ _ _)
@@ -1956,6 +1966,7 @@ balanceL_ x l r = case r of
19561966

19571967
-- balanceR is called when right subtree might have been inserted to or when
19581968
-- left subtree might have been deleted from.
1969+
-- @since FIXME
19591970
balanceR :: a -> Set a -> Set a -> Set a
19601971
balanceR x l r = case (l, r) of
19611972
(Bin ls _ _ _, Bin rs _ _ _)

0 commit comments

Comments
 (0)