summaryrefslogtreecommitdiff
path: root/testsuite/tests/safeHaskell/safeInfered/UnsafeWarn05.hs
blob: 3c9b3109f783856791cf01778048c1284bd52f9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{-# LANGUAGE Haskell2010 #-}
{-# LANGUAGE Unsafe #-}
{-# OPTIONS_GHC -fwarn-trustworthy-safe #-}
{-# OPTIONS_GHC -fwarn-safe #-}
{-# OPTIONS_GHC -fwarn-unsafe #-}
{-# OPTIONS_GHC -fenable-rewrite-rules #-}

-- | Trivial Unsafe Module
module UnsafeWarn05 where

import System.IO.Unsafe

f :: IO a -> a
f = unsafePerformIO

{-# RULES "g" g = undefined #-}
{-# NOINLINE [1] g #-}
g :: Int
g = 1