Nim's default `$` are implemented for value types not reference types. You 
_could_ implement:
    
    
    proc `$`(r: ref): string =
      if r.isNil:
        "nil"
      else:
        $r
    
    
    Run

But this naive approach and will explode when using cyclical types.

Reply via email to