anchor.diff:  check_behaviour(St0) ->
       behaviour_check(St0#lint.behaviour, St0).
   
  -%% behaviour_check([{Line,Behaviour}], State) -> State'
  +%% behaviour_check([{Anno,Behaviour}], State) -> State'
   %%  Check behaviours for existence and defined functions.
   
   behaviour_check(Bs, St0) ->
  
positive.code: pattern(P, Vt, St) ->
      pattern(P, Vt, Vt, St).    % Old = Vt
  
  pattern({var,_Line,'_'}, _Vt, _Old, St) ->
      {[],[],St}; %Ignore anonymous variable
  pattern({var,Line,V}, _Vt, Old, St) ->
      pat_var(V, Line, Old, [], St);
  pattern({char,_Line,_C}, _Vt, _Old, St) -> {[],[],St};
  pattern({integer,_Line,_I}, _Vt, _Old, St) -> {[],[],St};
  pattern({float,_Line,_F}, _Vt, _Old, St) -> {[],[],St};
  pattern({atom,Line,A}, _Vt, _Old, St) ->
      {[],[],keyword_warning(Line, A, St)};
  pattern({string,_Line,_S}, _Vt, _Old, St) -> {[],[],St};
  pattern({nil,_Line}, _Vt, _Old, St) -> {[],[],St};
  pattern({cons,_Line,H,T}, Vt, Old,  St0) ->
      {Hvt,Hnew,St1} = pattern(H, Vt, Old, St0),
      {Tvt,Tnew,St2} = pattern(T, Vt, Old, St1),
      {vtmerge_pat(Hvt, Tvt),vtmerge_pat(Hnew,Tnew),St2};
  pattern({tuple,_Line,Ps}, Vt, Old, St) ->
      pattern_list(Ps, Vt, Old, St);
  pattern({map,_Line,Ps}, Vt, Old, St) ->
      pattern_map(Ps, Vt, Old, St);
  pattern({record_index,Line,Name,Field}, _Vt, _Old, St) ->
      {Vt1,St1} =
          check_record(Line, Name, St,
                       fun (Dfs, St1) ->
                               pattern_field(Field, Name, Dfs, St1)
                       end),
      {Vt1,[],St1};
  pattern({record,Line,Name,Pfs}, Vt, Old, St) ->
      case maps:find(Name, St#lint.records) of
          {ok,{_Line,Fields}} ->
              St1 = used_record(Name, St),
              St2 = check_multi_field_init(Pfs, Line, Fields, St1),
              pattern_fields(Pfs, Name, Fields, Vt, Old, St2);
          error -> {[],[],add_error(Line, {undefined_record,Name}, St)}
      end;
  pattern({bin,_,Fs}, Vt, Old, St) ->
      pattern_bin(Fs, Vt, Old, St);
  pattern({op,_Line,'++',{nil,_},R}, Vt, Old, St) ->
      pattern(R, Vt, Old, St);
  pattern({op,_Line,'++',{cons,Li,{char,_L2,_C},T},R}, Vt, Old, St) ->
      pattern({op,Li,'++',T,R}, Vt, Old, St);    %Char unimportant here
  pattern({op,_Line,'++',{cons,Li,{integer,_L2,_I},T},R}, Vt, Old, St) ->
      pattern({op,Li,'++',T,R}, Vt, Old, St);    %Weird, but compatible!
  pattern({op,_Line,'++',{string,_Li,_S},R}, Vt, Old, St) ->
      pattern(R, Vt, Old, St);                   %String unimportant here
  pattern({match,_Line,Pat1,Pat2}, Vt, Old, St0) ->
      {Lvt,Lnew,St1} = pattern(Pat1, Vt, Old, St0),
      {Rvt,Rnew,St2} = pattern(Pat2, Vt, Old, St1),
      St3 = reject_invalid_alias(Pat1, Pat2, Vt, St2),
  
negative.code:     end.
  
  -type import() :: {module(), [fa()]} | module().
  -spec import(anno(), import(), lint_state()) -> lint_state().
  
  import(Anno, {Mod,Fs}, St00) ->
      St = check_module_name(Mod, Anno, St00),
      Mfs = ordsets:from_list(Fs),
      case check_imports(Anno, Mfs, St#lint.imports) of
  	[] ->
  	    St#lint{imports=add_imports(Mod, Mfs,
  					St#lint.imports)};
  