Re: safe vs. unsafe (Was: Haskell Platform proposal: Add the vector package)

On 13/07/2012 01:31, Bardur Arantsson wrote:
On 07/12/2012 11:16 PM, Simon Marlow wrote:
Hi Thomas,
All these questions are answered by the Haskell Symposium paper, which we'll post very shortly.
THANK YOU! This discussion has been ridiculuously abstract and confusing without any real (canonical) definition of the terms that are being bandied about.
Here it is: http://community.haskell.org/~simonmar/papers/safe-haskell.pdf Cheers, Simon

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? Best wishes, Wolfgang

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
participants (2)
-
Simon Marlow
-
Wolfgang Jeltsch