diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2017-05-26 16:43:18 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2017-05-26 17:36:16 -0700 |
commit | 2b25071710656d7a755c2f66c99734cd7990d1ba (patch) | |
tree | f4e3a83d6397343c7c225a354f4f2c837aef8190 /031merge.cc | |
parent | 5e320aa049bc1d5ad78eec23be0127f4a8d6ec3d (diff) | |
download | mu-2b25071710656d7a755c2f66c99734cd7990d1ba.tar.gz |
3877
Diffstat (limited to '031merge.cc')
-rw-r--r-- | 031merge.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/031merge.cc b/031merge.cc index 3faee8d8..4e4e4e34 100644 --- a/031merge.cc +++ b/031merge.cc @@ -119,7 +119,7 @@ void check_merge_calls(const recipe_ordinal r) { const instruction& inst = caller.steps.at(i); if (inst.name != "merge") continue; if (SIZE(inst.products) != 1) { - raise << maybe(caller.name) << "'merge' should yield a single product in '" << inst.original_string << "'\n" << end(); + raise << maybe(caller.name) << "'merge' should yield a single product in '" << to_original_string(inst) << "'\n" << end(); continue; } reagent/*copy*/ product = inst.products.at(0); @@ -127,12 +127,12 @@ void check_merge_calls(const recipe_ordinal r) { const type_tree* product_base_type = product.type->atom ? product.type : product.type->left; assert(product_base_type->atom); if (product_base_type->value == 0 || !contains_key(Type, product_base_type->value)) { - raise << maybe(caller.name) << "'merge' should yield a container in '" << inst.original_string << "'\n" << end(); + raise << maybe(caller.name) << "'merge' should yield a container in '" << to_original_string(inst) << "'\n" << end(); continue; } const type_info& info = get(Type, product_base_type->value); if (info.kind != CONTAINER && info.kind != EXCLUSIVE_CONTAINER) { - raise << maybe(caller.name) << "'merge' should yield a container in '" << inst.original_string << "'\n" << end(); + raise << maybe(caller.name) << "'merge' should yield a container in '" << to_original_string(inst) << "'\n" << end(); continue; } check_merge_call(inst.ingredients, product, caller, inst); @@ -147,7 +147,7 @@ void check_merge_call(const vector<reagent>& ingredients, const reagent& product assert(!state.data.empty()); trace(9999, "transform") << ingredient_index << " vs " << SIZE(ingredients) << end(); if (ingredient_index >= SIZE(ingredients)) { - raise << maybe(caller.name) << "too few ingredients in '" << inst.original_string << "'\n" << end(); + raise << maybe(caller.name) << "too few ingredients in '" << to_original_string(inst) << "'\n" << end(); return; } reagent& container = state.data.top().container; @@ -170,7 +170,7 @@ void check_merge_call(const vector<reagent>& ingredients, const reagent& product state.data.pop(); if (state.data.empty()) { if (ingredient_index < SIZE(ingredients)) - raise << maybe(caller.name) << "too many ingredients in '" << inst.original_string << "'\n" << end(); + raise << maybe(caller.name) << "too many ingredients in '" << to_original_string(inst) << "'\n" << end(); return; } ++state.data.top().container_element_index; @@ -186,7 +186,7 @@ void check_merge_call(const vector<reagent>& ingredients, const reagent& product // End check_merge_call Special-cases default: { if (!types_coercible(container, ingredients.at(ingredient_index))) { - raise << maybe(caller.name) << "incorrect type of ingredient " << ingredient_index << " in '" << inst.original_string << "'\n" << end(); + raise << maybe(caller.name) << "incorrect type of ingredient " << ingredient_index << " in '" << to_original_string(inst) << "'\n" << end(); raise << " (expected '" << debug_string(container) << "')\n" << end(); raise << " (got '" << debug_string(ingredients.at(ingredient_index)) << "')\n" << end(); return; @@ -197,7 +197,7 @@ void check_merge_call(const vector<reagent>& ingredients, const reagent& product state.data.pop(); if (state.data.empty()) { if (ingredient_index < SIZE(ingredients)) - raise << maybe(caller.name) << "too many ingredients in '" << inst.original_string << "'\n" << end(); + raise << maybe(caller.name) << "too many ingredients in '" << to_original_string(inst) << "'\n" << end(); return; } ++state.data.top().container_element_index; |