On 16/07/2012 16:17, Roman Leshchinskiy wrote:
Simon Marlow wrote:
Ah ok, so your concern was that you couldn't easily find out whether
runST was safe or not? If you look at the library docs:
Whether runST is safe or not has a huge impact on what ST code I can
declare Trustworthy even if I don't use runST at all. IMO, the fact that
ST code that doesn't do bounds checking must not be declared Trustworthy
should be stated somewhere prominent especially since this does *not*
apply to similar monads like IO and (presumably) STM. The library docs are
not really a good place for this - who would ever look at the
documentation of ST when figuring out Safe Haskell?
Ok, we can put something in the docs about ST.
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.
Cheers,
Simon
_______________________________________________
Haskell-platform mailing list
Haskell-platform@projects.haskell.org
http://projects.haskell.org/cgi-bin/mailman/listinfo/haskell-platform