+described in <cite id="ImperativeFP">.
+<p>
+Everyone knows that if the I/O computation wrapped in <tt/unsafePerformIO/
+performs side effects, then the relative order in which those side effects
+take place (relative to the main I/O trunk, or other calls to <tt/unsafePerformIO/)
+is indeterminate. It is less well known that <tt/unsafePerformIO/ is not type safe.
+For example:
+<tscreen><verb>
+ test :: IORef [a]
+ test = unsafePerformIO $ newIORef []
+
+ main = do
+ writeIORef test [42]
+ bang <- readIORef test
+ print (bang :: [Char])
+</verb></tscreen>
+This program will core dump. This problem with polymorphic references is
+well known in the ML community, and does not arise with normal monadic use
+of references. There is no easy way to make it impossible once you use
+<tt/unsafePerformIO/. Indeed, it is possible to write
+<tt>coerce :: a -> b</tt> with the help of <tt/unsafePerformIO/.
+So be careful!