avoid head

Seems like generate works fine to generate a single arbitrary value, I
dunno why I used sample' originally.
This commit is contained in:
Joey Hess 2024-09-26 17:49:41 -04:00
parent 5a8add5d55
commit 30713ab0d3
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -190,7 +190,7 @@ runFuzzAction (FuzzPause d) = randomDelay d
genFuzzAction :: Annex FuzzAction genFuzzAction :: Annex FuzzAction
genFuzzAction = do genFuzzAction = do
tmpl <- liftIO $ Prelude.head <$> sample' (arbitrary :: Gen FuzzAction) tmpl <- liftIO $ generate (arbitrary :: Gen FuzzAction)
-- Fix up template action to make sense in the current repo tree. -- Fix up template action to make sense in the current repo tree.
case tmpl of case tmpl of
FuzzAdd _ -> do FuzzAdd _ -> do