Haskell Platform proposal: Add the vector package
Simon Marlow
marlowsd at gmail.com
Tue Jul 17 22:40:00 BST 2012
On 17/07/12 10:28, Roman Leshchinskiy wrote:
> Simon Marlow wrote:
>>
>> The fact that you can't do arbitrary side effects in ST follows from the
>> definition of safety and the fact that runST injects ST computations
>> into pure computations. So there's really no design choice here. The
>> same applies to the Par monad, and any monad that injects into pure
>> computations.
>
> I disagree about there not being a choice. As I wrote, if the injection
> function is Unsafe (i.e., not Trustworthy), then there is no safe way to
> inject the computations and then those computations can do what they want
> (as far as Safe Haskell is concerned) because they can't be safely
> executed anyway. So it really depends on whether or not the injection
> function has been declared Trustworthy.
Well I suppose you *could* imagine having an Unsafe runST and then it
would be fine to mark your unsafe ST operations Trustworthy, but that
would be strange to say the least!
Anyway, what I'm taking away from all this is that we need to revise the
Safe Haskell docs in the GHC user's guide, with lots of examples and
guidance.
Cheers,
Simon
More information about the Haskell-platform
mailing list