anchor.diff:      end.
   
   
  -terminate(Reason, Debug, S, Q) ->
  -    terminate(exit, Reason, [], Debug, S, Q).
  -%%
   terminate(
     Class, Reason, Stacktrace, Debug,
  -  #{name := Name, module := Module,
  +  #{module := Module,
       state := State, state_data := StateData} = S,
     Q) ->
       try Module:terminate(Reason, State, StateData) of
  
positive.code: 			[Reply]
  		end,
  	    BadReplies =
  		reply_then_terminate(Reason, Debug, NewS, Q, Replies),
  	    %% Since we got back here Replies was bad
  	    terminate(
  	      {bad_return_value,{stop,Reason,BadReplies,NewStateData}},
  	      Debug, NewS, Q);
  	{next_state,NewState,NewStateData} ->
  
negative.code: 			postponed := P},
  		      Q, Timer);
  		[Reason,Debug] ->
  		    ?TERMINATE(Reason, Debug, S, [Event|Events]);
  		[Class,Reason,Stacktrace,Debug] ->
  		    terminate(
  		      Class, Reason, Stacktrace, Debug, S, [Event|Events])
  	    end;
  	%%
  	[Reason] ->
  	    ?TERMINATE(Reason, Debug0, S, [Event|Events])
      end.
  
  %%---------------------------------------------------------------------------
  