{-# LANGUAGE TemplateHaskell #-} module Main where import Language.Haskell.TH import Foo main :: IO () main = do putStrLn $(return $ LitE (StringL (show (foo 42))))