blob: c643e3c8fb6dbe1cb8208683464901037e9c442e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
  | 
{-
(c) The University of Glasgow, 2000-2006
-}
{-# LANGUAGE CPP, MagicHash, UnboxedTuples #-}
module FastFunctions (
    inlinePerformIO,
  ) where
#include "HsVersions.h"
import GHC.Exts
import GHC.IO   (IO(..))
-- Just like unsafePerformIO, but we inline it.
{-# INLINE inlinePerformIO #-}
inlinePerformIO :: IO a -> a
inlinePerformIO (IO m) = case m realWorld# of (# _, r #)   -> r
  |