
On 20/07/2012 10:16, Wolfgang Jeltsch wrote:
Am Freitag, den 13.07.2012, 10:49 +0100 schrieb Simon Marlow:
Here it is:
http://community.haskell.org/~simonmar/papers/safe-haskell.pdf
On page 5, the paper mentions that RULES pragmas in an imported module may change the meaning of the importing module. This is true. However, I see another problem: RULES pragmas in the imported module can make the code in the imported and the importing module non-deterministic, as it is not clear which rules are fired. Is there a reason for this problem not being mentioned in the paper? Or am I understanding something wrong?
RULEs are necessarily non-determinstic because they match on expressions, but that would only be observable if the RULE was not semantics-preserving. So it is the fact that a RULE may be non-semantics-preserving that is the real problem, not the non-determinism. Cheers, Simon