Template Haskell mk functions