{-# LANGUAGE TemplateHaskell #-} module Main where import Foo data T a = T a deriving (Show) main :: IO () main = do let x = $$(foo [|| T () ||]) return ()