   """
   @spec location(t) :: keyword
   def location(env)
+
   def location(%{__struct__: Macro.Env, file: file, line: line}) do
     [file: file, line: line]
   end

  @opaque match_vars :: vars | :warn | :apply
  @opaque prematch_vars :: vars | nil

  @type t :: %{__struct__: __MODULE__,
               module: atom,
               file: file,
               line: line,
               function: name_arity | nil,
               context: context,
               requires: requires,
               aliases: aliases,
               functions: functions,
               macros: macros,
               macro_aliases: aliases,
               context_modules: context_modules,
               vars: vars,
               export_vars: export_vars,
               match_vars: match_vars,
               prematch_vars: prematch_vars,
               lexical_tracker: lexical_tracker}

  def __struct__ do
    %{__struct__: __MODULE__,
      module: nil,
      file: "nofile",
      line: 0,

      lexical_tracker: nil,
      export_vars: nil,
      match_vars: :warn,
      prematch_vars: nil
    }
  end

  def __struct__(kv) do
    Enum.reduce(kv, __struct__(), fn {k, v}, acc -> :maps.update(k, v, acc) end)
  end

  @doc """
