[Haskell-cafe] bytestring, array and Safe Haskell

Francesco Mazzoli f at mazzo.li
Tue May 8 22:03:00 CEST 2012


Why are 
http://hackage.haskell.org/packages/archive/bytestring/0.9.2.1/doc/html/Data-ByteString-Unsafe.html 
and 
http://hackage.haskell.org/packages/archive/array/0.4.0.0/doc/html/Data-Array-Unsafe.html 
Safe-inferred?

The first one uses inlinePerformIO, so it clearly shouldn't be marked as 
Safe. Maybe Safe Haskell doesn't check that function?
The second is a bit messier since it uses unboxed types and primitive 
operations... But they clearly should be marked as Unsafe, and it 
surprises me that Safe Haskell is that relaxed when checking for safe 
functions.

Francesco.



More information about the Haskell-Cafe mailing list