Skip to content

Commit d516927

Browse files
author
Johannes Waldmann
committed
avoid arithmetic exception
1 parent 37ae55f commit d516927

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

containers/src/Data/Set/Internal.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1828,6 +1828,7 @@ splitRoot orig =
18281828
-- @since 0.5.11
18291829

18301830
powerSet :: Set a -> Set (Set a)
1831+
powerSet xs | null xs = singleton xs
18311832
powerSet xs =
18321833
let !w = length xs
18331834
!u = A.listArray (0, w-1) $ toList xs

0 commit comments

Comments
 (0)