summaryrefslogtreecommitdiff
path: root/libraries/base/GHC/IO/Unsafe.hs
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/base/GHC/IO/Unsafe.hs')
-rw-r--r--libraries/base/GHC/IO/Unsafe.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/libraries/base/GHC/IO/Unsafe.hs b/libraries/base/GHC/IO/Unsafe.hs
index 5284dcf887..e6c43e920c 100644
--- a/libraries/base/GHC/IO/Unsafe.hs
+++ b/libraries/base/GHC/IO/Unsafe.hs
@@ -117,6 +117,10 @@ monadic use of references. There is no easy way to make it impossible
once you use 'unsafePerformIO'. Indeed, it is
possible to write @coerce :: a -> b@ with the
help of 'unsafePerformIO'. So be careful!
+
+WARNING: If you're looking for "a way to get a 'String' from an 'IO String'",
+then 'unsafePerformIO' is not the way to go. Learn about do-notation and the
+@<-@ syntax element before you proceed.
-}
unsafePerformIO :: IO a -> a
unsafePerformIO m = unsafeDupablePerformIO (noDuplicate >> m)