{-# LANGUAGE BangPatterns #-} {-# OPTIONS_GHC -fno-full-laziness -fno-cse #-} module Data.StableName.Extra ( StableName, makeStableName', ) where import GHC.StableName import System.IO.Unsafe -- | This function evaluates its argument to WHNF and returns a stable name for -- the evaluation result. This function is not referentially transparent and is -- implemented using 'unsafePerformIO'. {-# NOINLINE makeStableName' #-} makeStableName' :: a -> StableName a makeStableName' !x = unsafePerformIO (makeStableName x)