Skip to content

Commit 002005e

Browse files
authored
Merge pull request #6897 from phadej/nes-toSet
Add toSet to NonEmptySet
2 parents 722e4cf + 6ed1438 commit 002005e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Cabal/Distribution/Compat/NonEmptySet.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ module Distribution.Compat.NonEmptySet (
88
toNonEmpty,
99
fromNonEmpty,
1010
toList,
11+
toSet,
1112
-- * Query
1213
member,
1314
-- * Map
@@ -100,6 +101,9 @@ toNonEmpty (NES s) = case Set.toList s of
100101
toList :: NonEmptySet a -> [a]
101102
toList (NES s) = Set.toList s
102103

104+
toSet :: NonEmptySet a -> Set.Set a
105+
toSet (NES s) = s
106+
103107
-------------------------------------------------------------------------------
104108
-- Query
105109
-------------------------------------------------------------------------------

0 commit comments

Comments
 (0)