Template Haskell for test framework