Skip to content

Commit

Permalink
Clarify error message
Browse files Browse the repository at this point in the history
  • Loading branch information
ocharles authored and moodmosaic committed May 19, 2023
1 parent a7369cd commit 291880e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hedgehog/src/Hedgehog/Internal/Gen.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1194,7 +1194,7 @@ constant =
element :: (Foldable f, MonadGen m) => f a -> m a
element fa = case toList fa of
[] ->
error "Hedgehog.Gen.element: used with empty list"
error "Hedgehog.Gen.element: used with empty Foldable"
xs -> do
n <- integral $ Range.constant 0 (length xs - 1)
pure $ xs !! n
Expand Down

0 comments on commit 291880e

Please sign in to comment.