I have nailed down the reason why compiles() failed:
    

  * procDef body was full of resolved symbols, so it has to be piped through 
parseStmt(repr(...))



The following works:
    
    
    macro hasNoSideEffects(p : typed) : bool =
      var procDef = getImpl(p.symbol)
      addPragma(procDef, newIdentNode("noSideEffect"))
      result = newCall(newIdentNode("compiles"), parseStmt(repr(procDef)))
    

Still I think we would more convenient to have a standard function in macros 
module that will expose tags and effects of the procs. 

Reply via email to