Change array.fetch_items/4 to return an empty list for an empty range in the
case where the endpoints of that range are not within the array bounds.
library/array.m:
As above.
deep_profiler/autopar_types.m:
Undo Zoltan's recent workaround for the above behaviour.
tests/hard_coded/array_fetch_items.{m,ex}:
Add tests for this behaviour.
Change the behaviour of the above predicate in the following ways:
- throw an index_out_of_bounds/0 exception instead of a software_error/0
exception if either index is out of bounds.
- perform the out of bounds check before checking if the third argument is
less than the second.
Add an more comprehensive test of fetch_items/4.
library/array.m:
Make it clear that the range of indexes passed to fetch_items is
inclusive.
Throw an index_out_of_bounds/0 exception instead of a software_error/1
exception if either of the indexes is out of bounds.
Perform the array bounds check first, before checking if the third
argument is less than the second.
Document what happens if the upper index is less than the lower one.
Fix a typo in the documentation of fill_range/4.
Update the definition of to_list/2 to conform with the above change
to the array bounds checks.
NEWS:
Announce the above change to the semantics of fetch_items/0.
tests/hard_coded/Mmakefile:
tests/hard_coded/array_fetch_items.{m,exp}:
Add a more comprehensive