You cannot `gensym` the pragma since it is injected as parameter. But you can 
simply enclose the template body in a block:
    
    
    template foo(txn, body: untyped): untyped =
      block:
        let txn = 1
        body
    
    foo hello:
      echo hello
    
    foo hello:
      echo hello
    

Reply via email to