
wren ng thornton wrote:
Andrea Vezzosi wrote:
On Thu, Jan 8, 2009 at 5:25 AM, wren ng thornton
wrote: The question for y'all is what should I call it? I've been calling the template-function qaf (for Compiled Applicative Form ;) and the type class with that function would be the only thing in the package, but I'm not sure where QAF.hs should be in the module hierarchy. Thoughts?
Isn't Lift[1] already the right class for this?
class Lift t where lift :: t -> Q Exp
[1] http://haskell.org/ghc/docs/latest/html/libraries/template-haskell/Language-...
I don't see any documentation there to say what it does, so I'm not sure. (A common problem with TH, unfortunately.)
After hunting down the source code, yes it looks like Lift does the same thing as my code. (Though the Int instance looks like it's more liberal since it doesn't restrict the ExpQ to being an Int.) It'd be nice if the TH API had better documentation... -- Live well, ~wren