Hmm, so almost every bit of logic is pushed to the database. The parts that are not pushed to the database are then delegated to Template Haskell. Not exactly sure what this demonstrates. Macros are good? Seems lacking in terms of what the actual payoff is here.