summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci/scripts/T16876B.hs
blob: 06703b00b5b7e000b12f51c0ab16e74776507983 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE UnboxedTuples #-}
{-# OPTIONS_GHC -fbyte-code #-}
module T16876B where

import T16876A
import GHC.Exts
import GHC.IO

inlinePerformIO :: IO a -> a
inlinePerformIO (IO m) = case m realWorld# of
  (# _, r #) -> r
{-# INLINE inlinePerformIO #-}

g :: Int
g = inlinePerformIO $ return 1

-- |
--
-- >>> h == (f + g)
-- True
h :: Int
h = 2