Update Foreign.* for Safe Haskell now that they're safe by default
[ghc.git] / testsuite / tests / safeHaskell / unsafeLibs / BadImport05.hs
1 {-# LANGUAGE Safe #-}
2 -- | Import unsafe module Foreign.Unsafe to make sure it fails
3 module Main where
4
5 import System.IO.Unsafe (unsafePerformIO)
6
7 f :: Int
8 f = unsafePerformIO $ putStrLn "What kind of swallow?" >> return 2
9
10 main :: IO ()
11 main = putStrLn $ "X is: " ++ show f
12