[Haskell-cafe] Staged evaluation, names?
wren ng thornton
wren at freegeek.org
Fri Jan 9 08:50:10 EST 2009
wren ng thornton wrote:
> Andrea Vezzosi wrote:
>> On Thu, Jan 8, 2009 at 5:25 AM, wren ng thornton <wren at freegeek.org>
>>> 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.
>> Isn't Lift already the right class for this?
>> class Lift t where
>> lift :: t -> Q Exp
> 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...
More information about the Haskell-Cafe