Use Q monad and IO moand fail in templates.
Add compile message functions for TH.
Use reportMessage function.
Use new compile message report functions.
Add no primary key warning message.
Divide pure lookup and warning Q computation.