anchor.diff:  -export([t_is_identifier/1]).
   -endif.
   
  --export_type([erl_type/0, opaques/0, type_table/0, var_table/0]).
  +-export_type([erl_type/0, opaques/0, type_table/0]).
   
   %%-define(DEBUG, true).
   
  
positive.code: %%-----------------------------------------------------------------------------
  %% Substitution of variables
  %%
  %% Dialyzer versions prior to R15B used a dict data structure to map variables
  %% to types. Hans Bolinder suggested the use of lists of Key-Value pairs for
  %% this data structure and measurements showed a non-trivial speedup when using
  %% them for operations within this module (e.g. in t_unify/2). However, there
  %% is code outside erl_types that still passes a dict:dict() in the 2nd argument.
  %% So, for the time being, this module provides a t_subst/2 function for these
  %% external calls and a clone of it (t_subst_kv/2) which is used from all calls
  %% from within this module. This code duplication needs to be eliminated at
  %% some point.
  
  -spec t_subst(erl_type(), #{atom() => erl_type()}) -> erl_type().
  
  t_subst(T, Dict) ->
    case t_has_var(T) of
      true -> t_subst_dict(T, Dict);
      false -> T
    end.
  
  t_subst_dict(?var(Id), Dict) ->
    case maps:find(Id, Dict) of
      error -> ?any;
      {ok, Type} -> Type
    end;
  t_subst_dict(?list(Contents, Termination, Size), Dict) ->
    case t_subst_dict(Contents, Dict) of
      ?none -> ?none;
      NewContents ->
        %% Be careful here to make the termination collapse if necessary.
        case t_subst_dict(Termination, Dict) of
  	?nil -> ?list(NewContents, ?nil, Size);
  	?any -> ?list(NewContents, ?any, Size);
  	Other ->
  
negative.code: -type type_table() :: dict:dict(record_key() | type_key(),
                                  record_value() | type_value()).
  
  -type var_table() :: #{atom() => erl_type()}.
  
  %%-----------------------------------------------------------------------------
  %% Unions
  