anchor.diff:                s=cerl_sets:new() :: cerl_sets:set(), %Variables in scope
                 t=#{} :: map(),                       %Types
                 in_guard=false}).                     %In guard or not.
  -
  --type type_info() :: cerl:cerl() | 'bool' | 'integer' | {'fun', pos_integer()}.
  --type yes_no_maybe() :: 'yes' | 'no' | 'maybe'.
  --type sub() :: #sub{}.
   
   -spec module(cerl:c_module(), [compile:option()]) ->
   	{'ok', cerl:c_module(), [_]}.
  
positive.code: %%  is suitable for a guard (no calls to non-guard BIFs, local
  %%  functions, or is_record/2).
  %%
  is_safe_bool_expr(Core, Sub) ->
      is_safe_bool_expr_1(Core, Sub, cerl_sets:new()).
  
  is_safe_bool_expr_1(#c_call{module=#c_literal{val=erlang},
                              name=#c_literal{val=is_record},
                              args=[A,#c_literal{val=Tag},#c_literal{val=Size}]},
                      Sub, _BoolVars) when is_atom(Tag), is_integer(Size) ->
      is_safe_simple(A, Sub);
  is_safe_bool_expr_1(#c_call{module=#c_literal{val=erlang},
                              name=#c_literal{val=is_record}},
                      _Sub, _BoolVars) ->
      %% The is_record/2 BIF is NOT allowed in guards.
      %% The is_record/3 BIF where its second argument is not an atom or its third
      %% is not an integer is NOT allowed in guards.
  
negative.code:     %%
      Case;
  opt_bool_case_guard(#c_case{arg=Arg,clauses=Cs0}=Case) ->
      case is_safe_bool_expr(Arg) of
  	false ->
  	    Case;
  	true ->
  