dmhouse at gmail.com
Thu Feb 1 16:14:05 EST 2007
(CCing the list as this is of general concern.)
On 01/02/07, Yitzchak Gale <gale at sefer.org> wrote:
> Why is this unsafe? What could go wrong?
It could segfault due to the type safety properties that unsafePerformIO breaks:
ref :: IORef [a]
ref <- newIORef 
main = do
writeIORef ref 
val <- readIORef ref
print (val :: [Char])
If you use the pragma you're forced to import unsafePerformIO and
hopefully check the haddock docs  where this issue is listed.
-David House, dmhouse at gmail.com
More information about the Haskell-prime