augustss/geniplate — pull request #2 by vlopezj (2014-10-24 22:10:52+00:00)
Title: Using type quotations instead of identifiers for specifying functions

In calls to `genUniverseBi*` and `genTransformBi*`, the desired type for the generated function is given by means of the name of an identifier in scope with the desired type. This saves some keystrokes by allowing to give the same identifier that was bound to the result of the Template Haskell splice.

In GHC 7.8, Template Haskell splices can no longer access local bindings. The current approach now compels the user to define dummy identifier for the desired type, and then pass that to the splice.

I've created _primed_ versions of the functions that take the types as a type splice. As a bonus, and combined with the ScopedTypeVariables extensions, this allows for creating polymorphic functions without the need for an explicit "forall", by binding to local type variables.