As I said previously, you don't need eval here. The best way to handle this code is to have the `trace` function return a quoted expression that will be evaluated and call `:erlang.trace_pattern(...)` with the arguments evaluated. I would basically do this:

```elixir
defmacro trace(trace) do
  IEx.Tracer.compile(trace)
end
```

And then compile will return a quoted expression like this:

```elixir
quote do
  IEx.Tracer.trace(unquote(pattern))
end
```

And the trace function will receive the pattern. Then we just need to guarantee the server is running and call `:erlang.trace_pattern/3`.