Specifications of 'any', 'all', 'findIndices'

Koen Claessen koen@cs.chalmers.se
Tue, 23 Jan 2001 12:30:12 +0100 (MET)

Eric Shade wondered:

 | I have some questions about the specifications of
 | 'any', 'all', and 'findIndices' in the Haskell 98
 | reports.  [...] it seems to me that it generates a lot
 | of garbage because map will produce a list of Booleans
 | [...]

Several people have already commented on this. What I want
to add is the following.

The definitions in the Haskell report are a *specification*,
not an implementation. It probably depends on the compiler
which particular implementation runs faster.

Therefore, the Haskell report provides a clear (yes, this is
debatable) *possible* implementation, and the compiler
writer is free to implement this in whatever way (s)he
likes. As long as the implementation has the same functional
behavior as the specification in the report.


Koen Claessen         http://www.cs.chalmers.se/~koen
phone:+46-31-772 5424      mailto:koen@cs.chalmers.se
Chalmers University of Technology, Gothenburg, Sweden