On Wed, Jul 11, 2012 at 4:38 PM, Brandon Allbery <allber...@gmail.com> wrote:
> unsafePerformIO is unsafe.
>
> Data.ByteString.map is only unsafe if it allows unsafePerformIO to be
> abused.
>
> If it can verify that nothing actually unsafe takes place — which it does,
> by dint of the promise inherent in it being exposed as pure —
> Data.ByteString.map is *not* unsafe.  The mechanical application of "oh, it
> uses unsafePerformIO, we don't care whether it proves it has used it safely:
> it must by definition be unsafe" just complicates things even more.  If
> indeed it's not simply a strawman.

It's unsafe in the sense that any module containing it cannot be
marked as Safe (only Trustworthy) and thus won't fit the scheme with
modules containing only Safe functions that Simon described.

-- Johan

_______________________________________________
Haskell-platform mailing list
Haskell-platform@projects.haskell.org
http://projects.haskell.org/cgi-bin/mailman/listinfo/haskell-platform

Reply via email to