safe vs. unsafe (Was: Haskell Platform proposal: Add the vector package)

Bas van Dijk v.dijk.bas at gmail.com
Wed Jul 11 22:11:23 BST 2012


On 11 July 2012 20:49, Henning Thielemann <lemming at henning-thielemann.de> wrote:
> I think the idea was to have Unsafe modules and move the unsafe functions
> there. :-)

Indeed. I don't see the point about having .Safe modules. Modules
should be safe by default as you mentioned before. I guess the reason
we have .Safe modules in base and vector is for backwards
compatibility.

The ideal, but currently, impossible way of dealing with this is to
mark the _export_ of unsafe functions in a module as DEPRECATED and in
a later version remove the unsafe functions and mark the module as
Trustworthy. However this requires support for deprecating exports:

http://hackage.haskell.org/trac/ghc/ticket/4879

Bas



More information about the Haskell-platform mailing list