{-# NOINLINE foo #-} foo :: Show a => a -> String foo x = show x main :: IO () main = putStrLn (foo 42)