about summary refs log tree commit diff stats
path: root/056recipe_header.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-02-25 07:39:25 -0800
committerKartik K. Agaram <vc@akkartik.com>2016-02-25 07:46:56 -0800
commitf51e9f63b40ce3d5c4d40808bf1b7e83ab7d60ff (patch)
tree4730fc0e0e69e8537686730a7a233d84b54f0266 /056recipe_header.cc
parentb5ab709c53d3f8464e6358678a3c57a1fc6e64b8 (diff)
downloadmu-f51e9f63b40ce3d5c4d40808bf1b7e83ab7d60ff.tar.gz
2701 - turn some warnings into errors
I really have only one warning left: when somebody redefines a function.
I think I'm going to just turn that into an error as well and drop the
notion of warnings altogether. Anytime we find something wrong we stop
running the program. This is a place where hygiene is justified.
Diffstat (limited to '056recipe_header.cc')
-rw-r--r--056recipe_header.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/056recipe_header.cc b/056recipe_header.cc
index 046a607a..01105e7a 100644
--- a/056recipe_header.cc
+++ b/056recipe_header.cc
@@ -220,7 +220,7 @@ void check_calls_against_header(const recipe_ordinal r) {
       if (!types_coercible(callee.ingredients.at(i), inst.ingredients.at(i)))
         raise_error << maybe(caller.name) << "ingredient " << i << " has the wrong type at '" << to_string(inst) << "'\n" << end();
       if (is_unique_address(inst.ingredients.at(i)))
-        raise << maybe(caller.name) << "try to avoid passing non-shared addresses into calls, like ingredient " << i << " at '" << to_string(inst) << "'\n" << end();
+        raise_error << maybe(caller.name) << "try to avoid passing non-shared addresses into calls, like ingredient " << i << " at '" << to_string(inst) << "'\n" << end();
     }
     for (long int i = 0; i < min(SIZE(inst.products), SIZE(callee.products)); ++i) {
       if (is_dummy(inst.products.at(i))) continue;
@@ -228,7 +228,7 @@ void check_calls_against_header(const recipe_ordinal r) {
       if (!types_coercible(inst.products.at(i), callee.products.at(i)))
         raise_error << maybe(caller.name) << "product " << i << " has the wrong type at '" << to_string(inst) << "'\n" << end();
       if (is_unique_address(inst.products.at(i)))
-        raise << maybe(caller.name) << "try to avoid getting non-shared addresses out of calls, like product " << i << " at '" << to_string(inst) << "'\n" << end();
+        raise_error << maybe(caller.name) << "try to avoid getting non-shared addresses out of calls, like product " << i << " at '" << to_string(inst) << "'\n" << end();
     }
   }
 }
@@ -244,7 +244,7 @@ bool is_unique_address(reagent x) {
 //: additionally, warn on calls receiving non-shared addresses
 
 :(scenario warn_on_calls_with_addresses)
-% Hide_warnings= true;
+% Hide_errors = true;
 recipe main [
   1:address:number <- copy 3/unsafe
   foo 1:address:number
@@ -253,10 +253,10 @@ recipe foo x:address:number [
   local-scope
   load-ingredients
 ]
-+warn: main: try to avoid passing non-shared addresses into calls, like ingredient 0 at 'foo 1:address:number'
++error: main: try to avoid passing non-shared addresses into calls, like ingredient 0 at 'foo 1:address:number'
 
 :(scenario warn_on_calls_with_addresses_2)
-% Hide_warnings= true;
+% Hide_errors = true;
 recipe main [
   1:address:number <- foo
 ]
@@ -265,7 +265,7 @@ recipe foo -> x:address:number [
   load-ingredients
   x <- copy 0
 ]
-+warn: main: try to avoid getting non-shared addresses out of calls, like product 0 at '1:address:number <- foo '
++error: main: try to avoid getting non-shared addresses out of calls, like product 0 at '1:address:number <- foo '
 
 //:: Check types going in and out of all recipes with headers.