4 Jul 2012 12:59
Re: Haskell Platform proposal: Add the vector package
On 18/06/2012 23:06, Roman Leshchinskiy wrote: > On 18/06/2012, at 19:39, Johan Tibell wrote: > >> On Mon, Jun 18, 2012 at 9:54 AM, Bas van Dijk <v.dijk.bas@...> wrote: >>> I like the idea of the vector-safe package. Are you also proposing to >>> add this package to the HP? (I would also be +1 on that) >> >> I think it makes sense as a separate package, but I don't think it >> makes sense to add to the HP. SafeHaskell isn't used enough to warrant >> that. > > I fully agree with Johan and I wouldn't even really want to maintain > this separate package. It is a lot of work for something I don't use > and don't entirely understand. The *.Safe modules in vector are > currently bitrotted since I forget to update them when I add new > operations and I'm not really sure what is and isn't "safe" anyway. > Is anybody interested in this code at all? I respectfully disagree with this approach, I think it's heading in the wrong direction. We should be moving towards safe APIs by default, and separating out unsafe APIs into separate modules. That is what SafeHaskell is about: it's not an obscure feature that is only used by things like "Try Haskell", the boundary between safety and unsafety is something we should all be thinking about. In that sense, we are all users of SafeHaskell. We should think of it as "good style" and best practice to separate safe APIs from unsafe ones. I would argue against adding any unsafe APIs to the Haskell Platform(Continue reading)
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:
RSS Feed