From 4d238fd71e675d9fa060c03841cac9c356389b97 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 30 Jan 2016 22:22:52 -0800 Subject: 2620 I was finding it hard to wrap around the directionality of calls with 'lhs' and 'rhs'. Seems to work better with 'to' and 'from'. Let's see. --- 061recipe.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to '061recipe.cc') diff --git a/061recipe.cc b/061recipe.cc index 0b4686dc..5798f4df 100644 --- a/061recipe.cc +++ b/061recipe.cc @@ -177,14 +177,14 @@ recipe f x:boolean -> y:boolean [ ] +error: main: can't copy f to {1: (recipe number -> number)}; types don't match -:(before "End Matching Types For Literal(lhs)") -if (is_mu_recipe(lhs)) { - if (!contains_key(Recipe, rhs.value)) { - raise_error << "trying to store recipe " << rhs.name << " into " << debug_string(lhs) << " but there's no such recipe\n" << end(); +:(before "End Matching Types For Literal(to)") +if (is_mu_recipe(to)) { + if (!contains_key(Recipe, from.value)) { + raise_error << "trying to store recipe " << from.name << " into " << debug_string(to) << " but there's no such recipe\n" << end(); return false; } - const recipe& rrhs = get(Recipe, rhs.value); - const recipe& rlhs = from_reagent(lhs); + const recipe& rrhs = get(Recipe, from.value); + const recipe& rlhs = from_reagent(to); for (long int i = 0; i < min(SIZE(rlhs.ingredients), SIZE(rrhs.ingredients)); ++i) { if (!types_match(rlhs.ingredients.at(i), rrhs.ingredients.at(i))) return false; -- cgit 1.4.1-2-gfad0