anchor.diff:  %% Case
   
   'case'(Meta, [], E) ->
  -  compile_error(Meta, ?key(E, file), "missing do keyword in case");
  +  form_error(Meta, ?key(E, file), ?MODULE, {missing_do, 'case'});
   'case'(Meta, Opts, E) when not is_list(Opts) ->
  -  compile_error(Meta, ?key(E, file), "invalid arguments for case");
  +  form_error(Meta, ?key(E, file), ?MODULE, {invalid_args, 'case'});
   'case'(Meta, Opts, E) ->
  -  ok = assert_at_most_once('do', Opts, 0, fun(Kind) ->
  -    compile_error(Meta, ?key(E, file), "duplicated ~ts clauses given for case", [Kind])
  +  ok = assert_at_most_once('do', Opts, 0, fun(Key) ->
  +    form_error(Meta, ?key(E, file), ?MODULE, {duplicated_clauses, 'case', Key})
     end),
     EE = E#{export_vars := []},
     {EClauses, EVars} = lists:mapfoldl(fun(X, Acc) -> expand_case(Meta, X, Acc, EE) end, [], Opts),
  
positive.code:   Fun = expand_one(Meta, 'cond', 'do', fun elixir_expand:expand_args/2),
    expand_with_export(Meta, 'cond', Fun, Do, Acc, E);
  expand_cond(Meta, {Key, _}, _Acc, E) ->
    compile_error(Meta, ?key(E, file), "unexpected keyword ~ts in cond", [Key]).
  
  %% Receive
  
  'receive'(Meta, [], E) ->
    compile_error(Meta, ?key(E, file), "missing do or after keyword in receive");
  'receive'(Meta, Opts, E) when not is_list(Opts) ->
    compile_error(Meta, ?key(E, file), "invalid arguments for receive");
  'receive'(Meta, Opts, E) ->
    RaiseError = fun(Kind) ->
      compile_error(Meta, ?key(E, file), "duplicated ~ts clauses given for receive", [Kind])
    end,
    ok = assert_at_most_once('do', Opts, 0, RaiseError),
    ok = assert_at_most_once('after', Opts, 0, RaiseError),
  
negative.code:   assert_at_most_once(Kind, Rest, Count + 1, Fun);
  assert_at_most_once(Kind, [_ | Rest], Count, Fun) ->
    assert_at_most_once(Kind, Rest, Count, Fun).
  
  format_error({bad_or_missing_clauses, {Kind, Key}}) ->
    io_lib:format("expected -> clauses for ~ts in ~ts", [Key, Kind]);
  format_error({bad_or_missing_clauses, Kind}) ->
    io_lib:format("expected -> clauses in ~ts", [Kind]);
  format_error({missing_do, Kind}) ->
    io_lib:format("missing do keyword in ~ts", [Kind]);
  format_error({invalid_args, Kind}) ->
    io_lib:format("invalid arguments for ~ts", [Kind]);
  format_error({duplicated_clauses, Kind, Key}) ->
    io_lib:format("duplicated ~ts clauses given for ~ts", [Key, Kind]);
  format_error({unexpected_keyword, Kind, Keyword}) ->
    io_lib:format("unexpected keyword ~ts in ~ts", [Keyword, Kind]);
  format_error({wrong_number_of_args_for_clause, Expected, Kind, Key}) ->
    io_lib:format("expected ~ts for ~ts clauses (->) in ~ts", [Expected, Key, Kind]);
  format_error(multiple_after_clauses_in_receive) ->
    "expected a single -> clause for after in receive";
  format_error(missing_do_or_after_in_receive) ->
    "missing do or after keyword in receive";
  format_error(missing_keyword_in_try) ->
    "missing catch/rescue/after/else keyword in try";
  format_error(invalid_rescue_clause) ->
    "invalid rescue clause. The clause should match on an alias, a variable "
      "or be in the \"var in [alias]\" format".
  