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