H98: Ix class

Simon Peyton-Jones simonpj@microsoft.com
Tue, 11 Sep 2001 08:18:16 -0700

| Just to clarify, do we still require identities (1) and (3)=20
| below (pasted from the Library report and numbered)?  That=20
| is, is range obliged to yield its results in strict index=20
| order?  [This rules out Ix instances that do, e.g., blocked=20
| iteration unless the array itself is also re-blocked. =20
| Reblocking the array itself is arguably a good idea, but may=20
| not be what we expect...]
| 1)   range (l,u) !! index (l,u) i =3D=3D i   -- when i is in range
| 2)   inRange (l,u) i =3D=3D i `elem` range (l,u)
| 3)   map index (range (l,u))      =3D=3D [0..rangeSize (l,u)]

I was not proposing to remove these identities.   Should I?