All implementations in Data.Sequences return Nothing now.
This conforms to the (partial) behaviour of the underlying
type's corresponding function, as confirmed by the failing
tests when the nonnegative modifier was removed. When possible
index is implemented using the underlying's type corresponding
total function.
The default implementation now also returns Nothing for
negative indices. Returning (headMay . drop) besides
being strange, also did not correspond to the partial
behaviour of the underlying types.
Looks like CI is busted for other reasons, I'll need to look into that later. Anyway, this seems to be working from the test cases that did pass. Thanks!
All implementations in Data.Sequences return Nothing now. This conforms to the (partial) behaviour of the underlying type's corresponding function, as confirmed by the failing tests when the nonnegative modifier was removed. When possible index is implemented using the underlying's type corresponding total function.
The default implementation now also returns Nothing for negative indices. Returning (headMay . drop) besides being strange, also did not correspond to the partial behaviour of the underlying types.
Closes #172 and #114