This works:
    
    
    # ...
    proc main() =
      let debug = "-d" in commandLineParams()
      if debug:
        dumbMacro true
      else:
        dumbMacro false
    # ...
    

But this does not:
    
    
    # ...
    proc main() =
      let debug = "-d" in commandLineParams()
      dumbMacro(if debug: true else: false)
    # ...
    

Why is that? I thought `if debug: true else: false` would get 'resolved' to 
either `true` or `false`, but clearly something else is going on. Is there a 
way to 'extract' the boolean value of (the identifier) `debug` in the macro, so 
I don't have to write 4 lines?

Reply via email to