Skip to content

Commit dcf16d4

Browse files
sjakobitreeowl
authored andcommitted
Fix compilation of 'set-properties' test suite with GHC-8.6
Fixes #570.
1 parent bf591de commit dcf16d4

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tests/set-properties.hs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,9 +254,12 @@ setFromList :: [a] -> Gen (Set a)
254254
setFromList xs = flip evalStateT xs $ mkArb step (length xs)
255255
where
256256
step = do
257-
x : xs <- get
258-
put xs
259-
pure x
257+
xxs <- get
258+
case xxs of
259+
x : xs -> do
260+
put xs
261+
pure x
262+
[] -> error "setFromList"
260263

261264
data TwoSets = TwoSets (Set Int) (Set Int) deriving (Show)
262265

0 commit comments

Comments
 (0)