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

Henning Thielemann lemming at henning-thielemann.de
Wed Jul 11 22:46:42 BST 2012


On Wed, 11 Jul 2012, Bas van Dijk wrote:

> 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:

We can easily re-define functions, like

module Old where

import MyMod.Unsafe as Unsafe

{-# DEPRECATED "unsafeDoSomething" #-}
unsafeDoSomething :: a -> b
unsafeDoSomething = Unsafe.unsafeDoSomething


Do we really need deprecating exports?



More information about the Haskell-platform mailing list