Closed UlfNorell closed 3 months ago
These are the partial functions we get warnings for:
https://github.com/nick8325/quickcheck/blob/97ee742f1a17c5614812916e78117e419be8a4a1/src/Test/QuickCheck/Arbitrary.hs#L1209
Could be drop 1
.
https://github.com/nick8325/quickcheck/blob/97ee742f1a17c5614812916e78117e419be8a4a1/src/Test/QuickCheck/Function.hs#L143
head (someList ++ [d])
is a useful idiom. Not sure I want to change this to maybe fst d (uncons someList)
... (when was uncons
added to Data.List
?). I suppose we could define headWithDefault
locally.
https://github.com/nick8325/quickcheck/blob/97ee742f1a17c5614812916e78117e419be8a4a1/tests/Split.hs#L16-L17
map head . group
is another common idiom that I'm not sure I want to rewrite just to avoid the warning.
FWIW, map head . group
is exactly that if you use head
and group
from Data.List.NonEmpty
What's the case against just removing said partial function calls from the code base?