anchor.diff:                  if (typeOf(x) != typeOf(v)) begin
                       printFmt = printFmt + $format(" = ", fshow(x));
                   end
  -                $fdisplay(file, printFmt);
  +                if (printTimestamp) begin 
  +                   $fdisplay(file, "(%0d) ", $time, printFmt);
  +                end
  +                else begin
  +                   $fdisplay(file, printFmt);
  +                end
                   $fflush(file);
                   return x;
               endactionvalue);
  
positive.code: 
  // internal typeclass
  typeclass HasFPrintTraceHelper#(type t);
      function t fprintTraceHelper(File file, Fmt callName, Maybe#(Fmt) args, t x);
  endtypeclass
  // Base case: ActionValue#(t) (This covers Action since Action = ActionValue#(void))
  instance HasFPrintTraceHelper#(ActionValue#(t)) provisos (FShow#(t));
      function ActionValue#(t) fprintTraceHelper(File file, Fmt callName, Maybe#(Fmt) args, ActionValue#(t) av);
          return (actionvalue
                  t x <- av;
                  Fmt printFmt = callName;
  
negative.code: // external functions
  function t fprintTrace(File file, String msg, t x)
          provisos (HasFPrintTraceHelper#(t));
      return fprintTraceHelper(file, False, $format(msg), tagged Invalid, x);
  endfunction
  
  function t printTrace(String msg, t x)
          provisos (HasFPrintTraceHelper#(t));
      return fprintTraceHelper(stdout, False, $format(msg), tagged Invalid, x);
  endfunction
  
  module [m] fprintTraceM#(File file, String msg, m#(t) mkM)(t)
          provisos (IsModule#(m, a__), HasFPrintTraceHelper#(t));
      (* hide *)
      t _m <- mkM();
      return fprintTraceHelper(file, False, $format(msg), tagged Invalid, _m);
  endmodule
  
  module [m] printTraceM#(String msg, m#(t) mkM)(t)
          provisos (IsModule#(m, a__), HasFPrintTraceHelper#(t));
      (* hide *)
      t _m <- mkM;
      return fprintTraceHelper(stdout, False, $format(msg), tagged Invalid, _m);
  endmodule
  
  module [m] printTimedTraceM#(String msg, m#(t) mkM)(t)
          provisos (IsModule#(m, a__), HasFPrintTraceHelper#(t));
      (* hide *)
      t _m <- mkM;
      return fprintTraceHelper(stdout, True, $format(msg), tagged Invalid, _m);
  endmodule
  
  endpackage
  