safe vs. unsafe (Was: Haskell Platform proposal: Add the vector package)
Bas van Dijk
v.dijk.bas at gmail.com
Thu Jul 12 08:39:42 BST 2012
On 12 July 2012 05:52, Johan Tibell <johan.tibell at gmail.com> wrote:
> 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.
I think what Simon described was the current situation in the base
library where we have:
* .Unsafe modules marked as Unsafe that export an API which should be
considered unsafe.
* .Safe modules that export a safe API. These modules don't
necessarily need to be marked as Safe (most of them can't because they
themselves import unsafe modules, as in your Data.ByteString example)
but they do need to be Trustworthy. Look at [1] for an example.
Bas
[1] http://www.haskell.org/ghc/docs/latest/html/libraries/base-4.5.1.0/Control-Monad-ST-Safe.html
More information about the Haskell-platform
mailing list