Haskell Platform proposal: Add the vector package

Simon Marlow marlowsd at gmail.com
Thu Jul 5 16:21:00 BST 2012


On 05/07/2012 14:20, Roman Leshchinskiy wrote:

>  From the maintainance point of view, this would become easier if I had
> *.Unsafe modules rather than the *.Safe ones. But this is a signficant
> restructuring and the only reason to do it would be to support
> SafeHaskell. Moreover, I believe (though I haven't checked) that there are
> calls from safe to unsafe functions and vice versa. So now I would have to
> have a common base module with both safe and unsafe functions and reexport
> those from the right top-level module. No, this just isn't feasible.

It looks pretty straightforward to me.  For each M:

  - rename M to M.Internal (or suitable alternative)
  - rename M.Safe to M
  - add a (small) M.Unsafe where necessary


Of course, I can't force you to make this change, I can only say that I 
think it would be worthwhile, and now is a good time to make the change 
- it will be more difficult to do it later when the package is already 
in the platform.  I understand your objections, but I don't think any of 
them is a showstopper.

Standing back for a minute, one argument against doing this was that 
"SafeHaskell isn't widely used".  In order for Safe Haskell to be widely 
used, we have to make safe APIs available - if we don't, then clients of 
the library cannot use {-# LANGUAGE Safe #-}, and the chain is broken. 
Arguably we should be moving towards Safe being something that we 
routinely put at the top of our modules, and my motivation is just to 
nudge us in that direction.

HOWEVER, let me be clear for the purposes of this discussion about 
adding vector to the platform: given the choice between vector as it is 
(or without the .Safe modules) and no vector at all, I'll take vector 
every time.  It's a great package and we should have it in the platform.

Cheers,
	Simon



More information about the Haskell-platform mailing list