So we all know the age-old rule of thumb, that unsafeXXX is simply evil and anybody that uses it should be shot (except when it&#39;s ok).&nbsp;<div><br></div><div>I understand that unsafeXXX allows impurity, which defiles our ability to reason logically about haskell programs like we would like to. My question is, to what extent is this true?&nbsp;</div>
<div><br></div><div>Suppose we had a module, UnsafeRandoms, which had a function that would allow you to generate a different random number every time you call it. The semantics are relatively well-defined, impurity is safely sectioned off in its own impure module, which is clearly&nbsp;labeled&nbsp;as such. How much damage does this do?</div>
<div><br></div><div>Can we push the lines elsewhere? Is sectioning unsafeXXX into Unsafe modules a useful idiom that we can use for other things as well?</div>