From e4ac3c9e6e5464a0fc0f8fd3763a572e0e180c04 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Sat, 1 Dec 2018 14:13:33 -0800 Subject: 4814 --- html/001help.cc.html | 112 ++++++++++++++++++++++++++------------------------- 1 file changed, 58 insertions(+), 54 deletions(-) (limited to 'html/001help.cc.html') diff --git a/html/001help.cc.html b/html/001help.cc.html index fa9a953a..06c577a5 100644 --- a/html/001help.cc.html +++ b/html/001help.cc.html @@ -11,19 +11,22 @@ @@ -58,6 +61,7 @@ if ('onhashchange' in window) { +https://github.com/akkartik/mu/blob/master/001help.cc
   1 //: Everything this project/binary supports.
   2 //: This should give you a sense for what to look forward to in later layers.
@@ -67,42 +71,42 @@ if ('onhashchange' in window) {
   6   //: this is the functionality later layers will provide
   7   // currently no automated tests for commandline arg parsing
   8   if (argc <= 1) {
-  9     cerr << "Please provide a Mu program to run.\n"
- 10          << "\n";
+  9     cerr << "Please provide a Mu program to run.\n"
+ 10          << "\n";
  11   }
- 12   cerr << "Usage:\n"
- 13        << "  mu [options] [test] [files]\n"
- 14        << "or:\n"
- 15        << "  mu [options] [test] [files] -- [ingredients for function/recipe 'main']\n"
- 16        << "Square brackets surround optional arguments.\n"
- 17        << "\n"
- 18        << "Examples:\n"
- 19        << "  To load files and run 'main':\n"
- 20        << "    mu file1.mu file2.mu ...\n"
- 21        << "  To run 'main' and dump a trace of all operations at the end:\n"
- 22        << "    mu --trace file1.mu file2.mu ...\n"
- 23        << "  To run all tests:\n"
- 24        << "    mu test\n"
- 25        << "  To load files and then run all tests:\n"
- 26        << "    mu test file1.mu file2.mu ...\n"
- 27        << "  To run a single Mu scenario:\n"
- 28        << "    mu test file1.mu file2.mu ... scenario\n"
- 29        << "  To run a single Mu scenario and dump a trace at the end:\n"
- 30        << "    mu --trace test file1.mu file2.mu ... scenario\n"
- 31        << "  To load files and run only the tests in explicitly loaded files (for apps):\n"
- 32        << "    mu --test-only-app test file1.mu file2.mu ...\n"
- 33        << "  To load all files with a numeric prefix in a directory:\n"
- 34        << "    mu directory1 directory2 ...\n"
- 35        << "  You can test directories just like files.\n"
- 36        << "    mu test directory1 directory2 ...\n"
- 37        << "  To pass ingredients to a mu program, provide them after '--':\n"
- 38        << "    mu file_or_dir1 file_or_dir2 ... -- ingredient1 ingredient2 ...\n"
- 39        << "  To see where a mu program is spending its time:\n"
- 40        << "    mu --profile file_or_dir1 file_or_dir2 ...\n"
- 41        << "  this slices and dices time spent in various profile.* output files\n"
- 42        << "\n"
- 43        << "  To browse a trace generated by a previous run:\n"
- 44        << "    mu browse-trace file\n"
+ 12   cerr << "Usage:\n"
+ 13        << "  mu [options] [test] [files]\n"
+ 14        << "or:\n"
+ 15        << "  mu [options] [test] [files] -- [ingredients for function/recipe 'main']\n"
+ 16        << "Square brackets surround optional arguments.\n"
+ 17        << "\n"
+ 18        << "Examples:\n"
+ 19        << "  To load files and run 'main':\n"
+ 20        << "    mu file1.mu file2.mu ...\n"
+ 21        << "  To run 'main' and dump a trace of all operations at the end:\n"
+ 22        << "    mu --trace file1.mu file2.mu ...\n"
+ 23        << "  To run all tests:\n"
+ 24        << "    mu test\n"
+ 25        << "  To load files and then run all tests:\n"
+ 26        << "    mu test file1.mu file2.mu ...\n"
+ 27        << "  To run a single Mu scenario:\n"
+ 28        << "    mu test file1.mu file2.mu ... scenario\n"
+ 29        << "  To run a single Mu scenario and dump a trace at the end:\n"
+ 30        << "    mu --trace test file1.mu file2.mu ... scenario\n"
+ 31        << "  To load files and run only the tests in explicitly loaded files (for apps):\n"
+ 32        << "    mu --test-only-app test file1.mu file2.mu ...\n"
+ 33        << "  To load all files with a numeric prefix in a directory:\n"
+ 34        << "    mu directory1 directory2 ...\n"
+ 35        << "  You can test directories just like files.\n"
+ 36        << "    mu test directory1 directory2 ...\n"
+ 37        << "  To pass ingredients to a mu program, provide them after '--':\n"
+ 38        << "    mu file_or_dir1 file_or_dir2 ... -- ingredient1 ingredient2 ...\n"
+ 39        << "  To see where a mu program is spending its time:\n"
+ 40        << "    mu --profile file_or_dir1 file_or_dir2 ...\n"
+ 41        << "  this slices and dices time spent in various profile.* output files\n"
+ 42        << "\n"
+ 43        << "  To browse a trace generated by a previous run:\n"
+ 44        << "    mu browse-trace file\n"
  45        ;
  46   return 0;
  47 }
@@ -222,13 +226,13 @@ if ('onhashchange' in window) {
 161   switch (sig) {
 162     case SIGABRT:
 163       #ifndef __APPLE__
-164         cerr << "SIGABRT: might be an integer overflow if it wasn't an assert() failure or exception\n";
+164         cerr << "SIGABRT: might be an integer overflow if it wasn't an assert() failure or exception\n";
 165         _Exit(1);
 166       #endif
 167       break;
 168     case SIGILL:
 169       #ifdef __APPLE__
-170         cerr << "SIGILL: most likely caused by integer overflow\n";
+170         cerr << "SIGILL: most likely caused by integer overflow\n";
 171         _Exit(1);
 172       #endif
 173       break;
@@ -269,25 +273,25 @@ if ('onhashchange' in window) {
 208 //: 6. Map's operator[] being non-const is fucking evil.
 209 :(before "Globals")  // can't generate prototypes for these
 210 // from http://stackoverflow.com/questions/152643/idiomatic-c-for-reading-from-a-const-map
-211 template<typename T> typename T::mapped_type& get(T& map, typename T::key_type const& key) {
-212   typename T::iterator iter(map.find(key));
+211 template<typename T> typename T::mapped_type& get(T& map, typename T::key_type const& key) {
+212   typename T::iterator iter(map.find(key));
 213   assert(iter != map.end());
 214   return iter->second;
 215 }
-216 template<typename T> typename T::mapped_type const& get(const T& map, typename T::key_type const& key) {
-217   typename T::const_iterator iter(map.find(key));
+216 template<typename T> typename T::mapped_type const& get(const T& map, typename T::key_type const& key) {
+217   typename T::const_iterator iter(map.find(key));
 218   assert(iter != map.end());
 219   return iter->second;
 220 }
-221 template<typename T> typename T::mapped_type const& put(T& map, typename T::key_type const& key, typename T::mapped_type const& value) {
+221 template<typename T> typename T::mapped_type const& put(T& map, typename T::key_type const& key, typename T::mapped_type const& value) {
 222   // map[key] requires mapped_type to have a zero-arg (default) constructor
 223   map.insert(std::make_pair(key, value)).first->second = value;
 224   return value;
 225 }
-226 template<typename T> bool contains_key(T& map, typename T::key_type const& key) {
+226 template<typename T> bool contains_key(T& map, typename T::key_type const& key) {
 227   return map.find(key) != map.end();
 228 }
-229 template<typename T> typename T::mapped_type& get_or_insert(T& map, typename T::key_type const& key) {
+229 template<typename T> typename T::mapped_type& get_or_insert(T& map, typename T::key_type const& key) {
 230   return map[key];
 231 }
 232 //: The contract: any container that relies on get_or_insert should never call
-- 
cgit 1.4.1-2-gfad0