import System.IO.Unsafe f :: a -> af x = unsafePerformIO $ do print "whatever" return x main = print $ f 42
Standard input is empty
"whatever" 42
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!