| I'm reading the following rule from your answer:
|
| [|exp|] normally returns the unevaluated AST of exp. However, if exp
| contains
| local variables, these are lifted using Language.Haskell.TH.lift (i.e.
| evaluated
| before lifting).
|
| Is that correct?
|
|
| / Emil
|
| Yes,
Hi Emil,
Your problem is related to how are things evaluated not when. The
short answer is: if you want to make sure an expression is evaluated
before you lift it, don't use quasiquotes, call
Language.Haskell.TH.lift
On Thu, Mar 13, 2008 at 9:00 AM, Emil Axelsson [EMAIL PROTECTED] wrote:
Aha, I guess I thought for a while that [|x|] and lift x where the same thing.
Having thought too much about partial evaluation lately, I forgot that the main
purpose of quoting is to get the unevaluated AST.
I'll just use lift in the future then (for partial evalutation).
Thanks, Alfonso!
I'm reading the following rule from your answer:
[|exp|] normally returns the unevaluated AST of exp. However, if exp contains
local variables, these are lifted using Language.Haskell.TH.lift (i.e. evaluated
before lifting).
Is that correct?
/ Emil
On 2008-03-13 09:49, Alfonso Acosta
On Thu, Mar 13, 2008 at 11:13 AM, Emil Axelsson [EMAIL PROTECTED] wrote:
I'm reading the following rule from your answer:
[|exp|] normally returns the unevaluated AST of exp. However, if exp contains
local variables, these are lifted using Language.Haskell.TH.lift (i.e.
evaluated
before