stdlib: Implement error() function.
[goals.git] / stdlib / prelude.gl
index 5d072ea..7dc3b73 100644 (file)
@@ -40,6 +40,11 @@ tactic *exists (filename) = @{
 #----------------------------------------------------------------------
 # Basic functions.
 
+function error (msg) = @{
+    echo %msg >&2
+    exit 1
+}
+
 # Wrap list of strings in a call or tactic.
 pure function wrap (wrapper, xs) = @{
     echo '['