From 2f1c14829959b8274291c99d365bf958e0a7c2b8 Mon Sep 17 00:00:00 2001 From: Alexandre Terrasa Date: Tue, 26 Sep 2017 19:23:08 -0400 Subject: [PATCH] examples: annotate examples Signed-off-by: Alexandre Terrasa --- contrib/jwrapper/examples/java_api/api_user.nit | 2 +- contrib/jwrapper/examples/queue/user_test.nit | 2 ++ contrib/nitcc/examples/calc.nit | 2 +- contrib/nitcc/examples/minilang.nit | 2 ++ contrib/shibuqam/examples/reloadgame.nit | 2 +- contrib/shibuqam/examples/shibuqamoauth.nit | 2 +- contrib/wiringPi/examples/blink.nit | 3 +++ contrib/wiringPi/examples/read.nit | 3 +++ contrib/wiringPi/examples/shift.nit | 3 +++ examples/circular_list.nit | 2 +- examples/fibonacci.nit | 2 +- examples/int_stack.nit | 2 +- examples/procedural_array.nit | 2 +- .../examples/agent_simulation/agent_simulation.nit | 2 +- .../agent_simulation/simple_simulation.nit | 2 +- .../examples/chameneos-redux/chameneosredux.nit | 2 +- .../examples/fannkuchredux/fannkuchredux.nit | 2 +- lib/actors/examples/mandelbrot/mandelbrot.nit | 2 +- lib/actors/examples/simple/simple.nit | 2 +- lib/actors/examples/thread-ring/thread_ring.nit | 2 +- lib/ai/examples/puzzle.nit | 2 ++ lib/ai/examples/queens.nit | 2 +- lib/android/examples/src/ui_test.nit | 1 + lib/app/examples/http_request_example.nit | 1 + lib/app/examples/ui_example.nit | 1 + lib/bcm2835/examples/blink.nit | 2 +- lib/bcm2835/examples/input.nit | 2 +- lib/cocoa/examples/cocoa_extern_types.nit | 2 +- lib/cocoa/examples/cocoa_message_box.nit | 2 +- lib/cocoa/examples/hello_cocoa.nit | 2 +- lib/crapto/examples/repeating_key_xor_solve.nit | 2 ++ lib/curl/examples/curl_http.nit | 2 +- lib/dom/examples/checker.nit | 2 +- lib/dot/examples/clusters.nit | 1 + lib/dot/examples/hello.nit | 1 + lib/dot/examples/undirected_clusters.nit | 1 + .../examples/fonts_showcase/src/fonts_showcase.nit | 1 + lib/gamnit/examples/template/src/template.nit | 1 + .../examples/triangle/src/portable_triangle.nit | 1 + .../examples/triangle/src/standalone_triangle.nit | 2 +- lib/gettext/examples/langannot.nit | 2 +- lib/glesv2/examples/opengles2_hello_triangle.nit | 2 +- lib/html/examples/html_page.nit | 2 ++ lib/ios/examples/hello_ios.nit | 1 + lib/mpi/examples/src/mpi_simple.nit | 2 +- lib/nitcorn/examples/src/htcpcp_server.nit | 2 +- lib/nitcorn/examples/src/nitcorn_hello_world.nit | 2 +- lib/nitcorn/examples/src/nitcorn_reverse_proxy.nit | 1 + lib/nitcorn/examples/src/restful_annot.nit | 2 +- lib/nitcorn/examples/src/simple_file_server.nit | 2 +- lib/nitcorn/examples/src/test_restful_annot.nit | 2 ++ lib/pnacl/examples/converter/converter.nit | 2 +- lib/popcorn/examples/angular/example_angular.nit | 3 +++ .../examples/handlers/example_post_handler.nit | 2 ++ .../examples/handlers/example_query_string.nit | 2 ++ lib/popcorn/examples/hello_world/example_hello.nit | 2 ++ .../middlewares/example_advanced_logger.nit | 2 ++ .../middlewares/example_html_error_handler.nit | 2 ++ .../examples/middlewares/example_simple_logger.nit | 2 ++ lib/popcorn/examples/mongodb/example_mongodb.nit | 2 ++ .../examples/routing/example_glob_route.nit | 2 ++ .../examples/routing/example_param_route.nit | 2 ++ lib/popcorn/examples/routing/example_router.nit | 2 ++ lib/popcorn/examples/sessions/example_session.nit | 2 ++ .../examples/static_files/example_static.nit | 2 ++ .../static_files/example_static_default.nit | 2 ++ .../static_files/example_static_multiple.nit | 2 ++ .../examples/templates/example_templates.nit | 2 ++ lib/privileges/examples/drop_privileges.nit | 2 +- .../examples/concurrent_array_and_barrier.nit | 2 +- lib/pthreads/examples/jointask_example.nit | 2 +- lib/pthreads/examples/threaded_example.nit | 2 +- lib/pthreads/examples/threadpool_example.nit | 2 +- lib/sdl2/examples/minimal/src/minimal.nit | 2 +- .../examples/custom_serialization.nit | 2 +- lib/template/examples/tmpl_composer.nit | 2 ++ lib/vsm/.vsm.nit.swn | Bin 0 -> 16384 bytes lib/websocket/examples/websocket_server.nit | 2 +- src/examples/get_mclasses.nit | 2 +- src/examples/nitlight_as_a_service.nit | 2 +- src/examples/nitwebcrawl.nit | 2 +- src/examples/test_loader.nit | 2 +- 82 files changed, 111 insertions(+), 44 deletions(-) create mode 100644 lib/vsm/.vsm.nit.swn diff --git a/contrib/jwrapper/examples/java_api/api_user.nit b/contrib/jwrapper/examples/java_api/api_user.nit index a06bf95..f313c40 100644 --- a/contrib/jwrapper/examples/java_api/api_user.nit +++ b/contrib/jwrapper/examples/java_api/api_user.nit @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import java_api +import java_api is example # Get a Java string var str = java_lang_integer_to_string_int(5678) diff --git a/contrib/jwrapper/examples/queue/user_test.nit b/contrib/jwrapper/examples/queue/user_test.nit index 882a4d4..c963dc2 100644 --- a/contrib/jwrapper/examples/queue/user_test.nit +++ b/contrib/jwrapper/examples/queue/user_test.nit @@ -12,6 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +module user_test is example + import queue var queue = new JavaQueue diff --git a/contrib/nitcc/examples/calc.nit b/contrib/nitcc/examples/calc.nit index d444f2c..924fab4 100644 --- a/contrib/nitcc/examples/calc.nit +++ b/contrib/nitcc/examples/calc.nit @@ -14,7 +14,7 @@ # Example of a calculation used nitcc # see `calc.sablecc` for the grammar -module calc +module calc is example # Reuse the test program to simplify the code import calc_test_parser diff --git a/contrib/nitcc/examples/minilang.nit b/contrib/nitcc/examples/minilang.nit index 29ea62e..3d587b3 100644 --- a/contrib/nitcc/examples/minilang.nit +++ b/contrib/nitcc/examples/minilang.nit @@ -1,3 +1,5 @@ +module minilang is example + import minilang_test_parser # An naive recursive stack-based interpreter of the minilang language. diff --git a/contrib/shibuqam/examples/reloadgame.nit b/contrib/shibuqam/examples/reloadgame.nit index 24eecf5..6fc3169 100644 --- a/contrib/shibuqam/examples/reloadgame.nit +++ b/contrib/shibuqam/examples/reloadgame.nit @@ -13,7 +13,7 @@ # limitations under the License. # Example that uses `shibuqam` to authenticate users and count the number of time they reload. -module reloadgame +module reloadgame is example import popcorn import counter diff --git a/contrib/shibuqam/examples/shibuqamoauth.nit b/contrib/shibuqam/examples/shibuqamoauth.nit index 326f0bf..ae971c3 100644 --- a/contrib/shibuqam/examples/shibuqamoauth.nit +++ b/contrib/shibuqam/examples/shibuqamoauth.nit @@ -168,7 +168,7 @@ # * no `client_id`: because we do not want to code a db of clients. The `redirect_uri` can be seen as a simple client_id. We have also no way to present the client to the user since we do not control the authorization page of shibboleth since is done by the reverse proxy. # * no `scope` and no `authorisation_code` since since there is nothing to access. We just get minimal information after the successful shibboleth login. Thus we have nothing more to authorise once the user is authenticated. # * no `client_secret`: the user information are already public. There is no need to make the code more complex to protect public information. -module shibuqamoauth +module shibuqamoauth is example import popcorn import popcorn::pop_json diff --git a/contrib/wiringPi/examples/blink.nit b/contrib/wiringPi/examples/blink.nit index b14ded6..399f4f6 100644 --- a/contrib/wiringPi/examples/blink.nit +++ b/contrib/wiringPi/examples/blink.nit @@ -13,6 +13,9 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + +module blink is example + import wiringPi if args.length != 1 then diff --git a/contrib/wiringPi/examples/read.nit b/contrib/wiringPi/examples/read.nit index 1ea366f..568b2fb 100644 --- a/contrib/wiringPi/examples/read.nit +++ b/contrib/wiringPi/examples/read.nit @@ -13,6 +13,9 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + +module read is example + import wiringPi if args.length != 1 then diff --git a/contrib/wiringPi/examples/shift.nit b/contrib/wiringPi/examples/shift.nit index 4038d28..abb474f 100644 --- a/contrib/wiringPi/examples/shift.nit +++ b/contrib/wiringPi/examples/shift.nit @@ -13,6 +13,9 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + +module wiringPi is example + import wiringPi if args.is_empty or args.length > 2 then diff --git a/examples/circular_list.nit b/examples/circular_list.nit index 2d1df4a..41d2e05 100644 --- a/examples/circular_list.nit +++ b/examples/circular_list.nit @@ -14,7 +14,7 @@ # Example of an implementation of circular lists # This example shows the usage of generics and somewhat a specialisation of collections. -module circular_list +module circular_list is example # Sequences of elements implemented with a double-linked circular list class CircularList[E] diff --git a/examples/fibonacci.nit b/examples/fibonacci.nit index 66cbfb0..50b93be 100644 --- a/examples/fibonacci.nit +++ b/examples/fibonacci.nit @@ -15,7 +15,7 @@ # limitations under the License. # Simple example of refinement where a method is added to the integer class. -module fibonacci +module fibonacci is example redef class Int # Calculate the self-th element of the fibonacci sequence. diff --git a/examples/int_stack.nit b/examples/int_stack.nit index eb2d9b3..1de6752 100644 --- a/examples/int_stack.nit +++ b/examples/int_stack.nit @@ -15,7 +15,7 @@ # An example that defines and uses stacks of integers. # The implementation is done with a simple linked list. # It features: free constructors, nullable types and some adaptive typing. -module int_stack +module int_stack is example # A stack of integer implemented by a simple linked list. # Note that this is only a toy class since a real linked list will gain to use diff --git a/examples/procedural_array.nit b/examples/procedural_array.nit index 5f88218..e7f9ce3 100644 --- a/examples/procedural_array.nit +++ b/examples/procedural_array.nit @@ -16,7 +16,7 @@ # Example of a procedural program (without explicit class definition). # This program manipulates arrays of integers. -module procedural_array +module procedural_array is example # The sum of the elements of `a'. # Uses a 'for' control structure. diff --git a/lib/actors/examples/agent_simulation/agent_simulation.nit b/lib/actors/examples/agent_simulation/agent_simulation.nit index 35fe57c..e4e08cb 100644 --- a/lib/actors/examples/agent_simulation/agent_simulation.nit +++ b/lib/actors/examples/agent_simulation/agent_simulation.nit @@ -13,7 +13,7 @@ # limitations under the License. # a "Framework" to make Multi-Agent Simulations in Nit -module agent_simulation is no_warning("missing-doc") +module agent_simulation is example, no_warning("missing-doc") import actors diff --git a/lib/actors/examples/agent_simulation/simple_simulation.nit b/lib/actors/examples/agent_simulation/simple_simulation.nit index d8be6c6..ea08535 100644 --- a/lib/actors/examples/agent_simulation/simple_simulation.nit +++ b/lib/actors/examples/agent_simulation/simple_simulation.nit @@ -17,7 +17,7 @@ # The steps consist of each agent greeting each other, and # waiting for every other agent to respond before notifying # to the `ClockAgent` that they finished their step. -module simple_simulation +module simple_simulation is example import agent_simulation diff --git a/lib/actors/examples/chameneos-redux/chameneosredux.nit b/lib/actors/examples/chameneos-redux/chameneosredux.nit index 60361a8..4b8ba9f 100644 --- a/lib/actors/examples/chameneos-redux/chameneosredux.nit +++ b/lib/actors/examples/chameneos-redux/chameneosredux.nit @@ -17,7 +17,7 @@ # # Complete description of the chameneos-redux : # https://benchmarksgame.alioth.debian.org/u64q/chameneosredux-description.html#chameneosredux -module chameneosredux is no_warning("missing-doc") +module chameneosredux is example, no_warning("missing-doc") import actors diff --git a/lib/actors/examples/fannkuchredux/fannkuchredux.nit b/lib/actors/examples/fannkuchredux/fannkuchredux.nit index 3b24800..42c251c 100644 --- a/lib/actors/examples/fannkuchredux/fannkuchredux.nit +++ b/lib/actors/examples/fannkuchredux/fannkuchredux.nit @@ -17,7 +17,7 @@ # # Complete description of the fannkuch-redux : # https://benchmarksgame.alioth.debian.org/u64q/fannkuchredux-description.html#fannkuchredux -module fannkuchredux is no_warning("missing-doc") +module fannkuchredux is example, no_warning("missing-doc") import actors diff --git a/lib/actors/examples/mandelbrot/mandelbrot.nit b/lib/actors/examples/mandelbrot/mandelbrot.nit index e04d4ec..f756970 100644 --- a/lib/actors/examples/mandelbrot/mandelbrot.nit +++ b/lib/actors/examples/mandelbrot/mandelbrot.nit @@ -17,7 +17,7 @@ # # Complete description of mandelbrot : # https://benchmarksgame.alioth.debian.org/u64q/mandelbrot-description.html#mandelbrot -module mandelbrot is no_warning("missing-doc") +module mandelbrot is example, no_warning("missing-doc") import actors diff --git a/lib/actors/examples/simple/simple.nit b/lib/actors/examples/simple/simple.nit index 8c98b40..7788240 100644 --- a/lib/actors/examples/simple/simple.nit +++ b/lib/actors/examples/simple/simple.nit @@ -13,7 +13,7 @@ # limitations under the License. # A very simple example of the actor model -module simple +module simple is example import actors diff --git a/lib/actors/examples/thread-ring/thread_ring.nit b/lib/actors/examples/thread-ring/thread_ring.nit index 18da93a..3c227b4 100644 --- a/lib/actors/examples/thread-ring/thread_ring.nit +++ b/lib/actors/examples/thread-ring/thread_ring.nit @@ -17,7 +17,7 @@ # # Complete description of the thread-ring : # http://benchmarksgame.alioth.debian.org/u64q/threadring-description.html#threadring -module thread_ring +module thread_ring is example import actors diff --git a/lib/ai/examples/puzzle.nit b/lib/ai/examples/puzzle.nit index 0583035..400af03 100644 --- a/lib/ai/examples/puzzle.nit +++ b/lib/ai/examples/puzzle.nit @@ -41,6 +41,8 @@ # # The shortest plan, in two steps, is to move *up* the tile under the hole (e), # then to move *left* the tile after the hole (h). +module puzzle is example + import ai::search # The state (`S`) is a square grid, modeled as a one-dimensional array of Tile. diff --git a/lib/ai/examples/queens.nit b/lib/ai/examples/queens.nit index 0e86903..2e33ff6 100644 --- a/lib/ai/examples/queens.nit +++ b/lib/ai/examples/queens.nit @@ -28,7 +28,7 @@ # # This program takes an integer n as argument then display all solutions for the # n-queens proglem (ie. on a n*n board). -module queens +module queens is example import ai::backtrack diff --git a/lib/android/examples/src/ui_test.nit b/lib/android/examples/src/ui_test.nit index 4f63a92..c6316ad 100644 --- a/lib/android/examples/src/ui_test.nit +++ b/lib/android/examples/src/ui_test.nit @@ -16,6 +16,7 @@ # Test for app.nit's UI services module ui_test is + example app_name "app.nit UI test" app_version(0, 1, git_revision) app_namespace "org.nitlanguage.ui_test" diff --git a/lib/app/examples/http_request_example.nit b/lib/app/examples/http_request_example.nit index 3c61498..a121f6c 100644 --- a/lib/app/examples/http_request_example.nit +++ b/lib/app/examples/http_request_example.nit @@ -14,6 +14,7 @@ # Example for the `app::http_request` main service `AsyncHttpRequest` module http_request_example is + example app_name "app.nit HTTP" app_namespace "org.nitlanguage.http_example" android_api_target 15 diff --git a/lib/app/examples/ui_example.nit b/lib/app/examples/ui_example.nit index 5d01592..8f4f8f1 100644 --- a/lib/app/examples/ui_example.nit +++ b/lib/app/examples/ui_example.nit @@ -14,6 +14,7 @@ # User interface example using `app::ui` module ui_example is + example app_name "app.nit UI" app_namespace "org.nitlanguage.ui_example" android_api_min 21 diff --git a/lib/bcm2835/examples/blink.nit b/lib/bcm2835/examples/blink.nit index 60a59aa..3d3bd82 100644 --- a/lib/bcm2835/examples/blink.nit +++ b/lib/bcm2835/examples/blink.nit @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -module blink +module blink is example import bcm2835 diff --git a/lib/bcm2835/examples/input.nit b/lib/bcm2835/examples/input.nit index 8acff6b..889ba51 100644 --- a/lib/bcm2835/examples/input.nit +++ b/lib/bcm2835/examples/input.nit @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -module input +module input is example import bcm2835 diff --git a/lib/cocoa/examples/cocoa_extern_types.nit b/lib/cocoa/examples/cocoa_extern_types.nit index 775e6e4..e99f43f 100644 --- a/lib/cocoa/examples/cocoa_extern_types.nit +++ b/lib/cocoa/examples/cocoa_extern_types.nit @@ -15,7 +15,7 @@ # limitations under the License. # Test extern classes from the Cocoa framework and extern factories -module cocoa_extern_types +module cocoa_extern_types is example import cocoa diff --git a/lib/cocoa/examples/cocoa_message_box.nit b/lib/cocoa/examples/cocoa_message_box.nit index 4e96768..0f43d9e 100644 --- a/lib/cocoa/examples/cocoa_message_box.nit +++ b/lib/cocoa/examples/cocoa_message_box.nit @@ -15,7 +15,7 @@ # limitations under the License. # Simple message box using the Cocoa framework -module cocoa_message_box +module cocoa_message_box is example import cocoa diff --git a/lib/cocoa/examples/hello_cocoa.nit b/lib/cocoa/examples/hello_cocoa.nit index 960b001..56fc059 100644 --- a/lib/cocoa/examples/hello_cocoa.nit +++ b/lib/cocoa/examples/hello_cocoa.nit @@ -15,7 +15,7 @@ # limitations under the License. # Hello world using the Cocoa framework -module hello_cocoa +module hello_cocoa is example import cocoa::foundation diff --git a/lib/crapto/examples/repeating_key_xor_solve.nit b/lib/crapto/examples/repeating_key_xor_solve.nit index f88e2d9..82d5652 100644 --- a/lib/crapto/examples/repeating_key_xor_solve.nit +++ b/lib/crapto/examples/repeating_key_xor_solve.nit @@ -12,6 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +module repeating_key_xor_solve is example + import base64 import crapto diff --git a/lib/curl/examples/curl_http.nit b/lib/curl/examples/curl_http.nit index 9eed5b8..e4fdf79 100644 --- a/lib/curl/examples/curl_http.nit +++ b/lib/curl/examples/curl_http.nit @@ -15,7 +15,7 @@ # limitations under the License. # Example use of the Curl module -module curl_http +module curl_http is example import curl diff --git a/lib/dom/examples/checker.nit b/lib/dom/examples/checker.nit index cc3b341..31fc682 100644 --- a/lib/dom/examples/checker.nit +++ b/lib/dom/examples/checker.nit @@ -9,7 +9,7 @@ # another product. # Simple XML validity checker using the `dom` module -module checker +module checker is example import dom diff --git a/lib/dot/examples/clusters.nit b/lib/dot/examples/clusters.nit index 2361e0d..306ec52 100644 --- a/lib/dot/examples/clusters.nit +++ b/lib/dot/examples/clusters.nit @@ -13,6 +13,7 @@ # limitations under the License. # Example from http://www.graphviz.org/content/cluster +module clusters is example import dot diff --git a/lib/dot/examples/hello.nit b/lib/dot/examples/hello.nit index 645620e..d4cbfcf 100644 --- a/lib/dot/examples/hello.nit +++ b/lib/dot/examples/hello.nit @@ -13,6 +13,7 @@ # limitations under the License. # Example from http://www.graphviz.org/content/hello +module hello is example import dot diff --git a/lib/dot/examples/undirected_clusters.nit b/lib/dot/examples/undirected_clusters.nit index 4b42567..9ef6e53 100644 --- a/lib/dot/examples/undirected_clusters.nit +++ b/lib/dot/examples/undirected_clusters.nit @@ -13,6 +13,7 @@ # limitations under the License. # Example from http://www.graphviz.org/Gallery/undirected/fdpclust.html +module undirected_clusters is example import dot diff --git a/lib/gamnit/examples/fonts_showcase/src/fonts_showcase.nit b/lib/gamnit/examples/fonts_showcase/src/fonts_showcase.nit index 10ba0b4..91f3073 100644 --- a/lib/gamnit/examples/fonts_showcase/src/fonts_showcase.nit +++ b/lib/gamnit/examples/fonts_showcase/src/fonts_showcase.nit @@ -7,6 +7,7 @@ # Font support showcase module fonts_showcase is + example app_name "gamnit fonts" app_namespace "org.gamnit.fonts_showcase" app_version(1, 0, git_revision) diff --git a/lib/gamnit/examples/template/src/template.nit b/lib/gamnit/examples/template/src/template.nit index 8bd28fd..29b9618 100644 --- a/lib/gamnit/examples/template/src/template.nit +++ b/lib/gamnit/examples/template/src/template.nit @@ -7,6 +7,7 @@ # Template for a 2D gamnit game module template is + example app_name "gamnit template" app_namespace "org.gamnit.template" app_version(0, 1, git_revision) diff --git a/lib/gamnit/examples/triangle/src/portable_triangle.nit b/lib/gamnit/examples/triangle/src/portable_triangle.nit index 21492ad..5c276b3 100644 --- a/lib/gamnit/examples/triangle/src/portable_triangle.nit +++ b/lib/gamnit/examples/triangle/src/portable_triangle.nit @@ -18,6 +18,7 @@ # * The book OpenGL ES 2.0 Programming Guide # * https://code.google.com/p/opengles-book-samples/source/browse/trunk/LinuxX11/Chapter_2/Hello_Triangle/Hello_Triangle.c module portable_triangle is + example app_name "gamnit Triangle" app_namespace "org.nitlanguage.triangle" app_version(1, 1, git_revision) diff --git a/lib/gamnit/examples/triangle/src/standalone_triangle.nit b/lib/gamnit/examples/triangle/src/standalone_triangle.nit index 9817d09..a766fb2 100644 --- a/lib/gamnit/examples/triangle/src/standalone_triangle.nit +++ b/lib/gamnit/examples/triangle/src/standalone_triangle.nit @@ -19,7 +19,7 @@ # References: # * The book OpenGL ES 2.0 Programming Guide # * https://code.google.com/p/opengles-book-samples/source/browse/trunk/LinuxX11/Chapter_2/Hello_Triangle/Hello_Triangle.c -module standalone_triangle +module standalone_triangle is example import app import gamnit::display diff --git a/lib/gettext/examples/langannot.nit b/lib/gettext/examples/langannot.nit index d278893..07cca24 100644 --- a/lib/gettext/examples/langannot.nit +++ b/lib/gettext/examples/langannot.nit @@ -13,7 +13,7 @@ # limitations under the License. # Sample module showing the use of the i18n annotation -module langannot is i18n +module langannot is example, i18n import gettext diff --git a/lib/glesv2/examples/opengles2_hello_triangle.nit b/lib/glesv2/examples/opengles2_hello_triangle.nit index da367cf..f85a1fa 100644 --- a/lib/glesv2/examples/opengles2_hello_triangle.nit +++ b/lib/glesv2/examples/opengles2_hello_triangle.nit @@ -18,7 +18,7 @@ # # From the book OpenGL ES 2.0 Programming Guide, see code reference: # https://code.google.com/p/opengles-book-samples/source/browse/trunk/LinuxX11/Chapter_2/Hello_Triangle/Hello_Triangle.c -module opengles2_hello_triangle +module opengles2_hello_triangle is example import glesv2 import egl diff --git a/lib/html/examples/html_page.nit b/lib/html/examples/html_page.nit index cf76665..a53f56e 100644 --- a/lib/html/examples/html_page.nit +++ b/lib/html/examples/html_page.nit @@ -12,6 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +module html_page is example + import html class NitHomepage diff --git a/lib/ios/examples/hello_ios.nit b/lib/ios/examples/hello_ios.nit index c5d6c8a..c06748e 100644 --- a/lib/ios/examples/hello_ios.nit +++ b/lib/ios/examples/hello_ios.nit @@ -14,6 +14,7 @@ # Simple iOS app with a single label module hello_ios is + example app_name "Hello iOS" app_namespace "nit.app.hello_ios" app_version(0, 5, git_revision) diff --git a/lib/mpi/examples/src/mpi_simple.nit b/lib/mpi/examples/src/mpi_simple.nit index abe289d..cc61f94 100644 --- a/lib/mpi/examples/src/mpi_simple.nit +++ b/lib/mpi/examples/src/mpi_simple.nit @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -module mpi_simple +module mpi_simple is example import mpi diff --git a/lib/nitcorn/examples/src/htcpcp_server.nit b/lib/nitcorn/examples/src/htcpcp_server.nit index 73177a1..d58dcca 100644 --- a/lib/nitcorn/examples/src/htcpcp_server.nit +++ b/lib/nitcorn/examples/src/htcpcp_server.nit @@ -17,7 +17,7 @@ # Hyper Text Coffee Pot Control Protocol # A server that implements HTCPCP. At the moment there are no additions. -module htcpcp_server +module htcpcp_server is example import nitcorn diff --git a/lib/nitcorn/examples/src/nitcorn_hello_world.nit b/lib/nitcorn/examples/src/nitcorn_hello_world.nit index 9eb1662..adcebd2 100644 --- a/lib/nitcorn/examples/src/nitcorn_hello_world.nit +++ b/lib/nitcorn/examples/src/nitcorn_hello_world.nit @@ -19,7 +19,7 @@ # The main page, `index.html`, is served dynamicly with `MyAction`. # The rest of the Web site fetches files from the local directory # `www/hello_world/`. -module nitcorn_hello_world +module nitcorn_hello_world is example import nitcorn diff --git a/lib/nitcorn/examples/src/nitcorn_reverse_proxy.nit b/lib/nitcorn/examples/src/nitcorn_reverse_proxy.nit index 19e02fb..25e1819 100644 --- a/lib/nitcorn/examples/src/nitcorn_reverse_proxy.nit +++ b/lib/nitcorn/examples/src/nitcorn_reverse_proxy.nit @@ -15,6 +15,7 @@ # limitations under the License. # Minimal example using a `ProxyAction` +module nitcorn_reverse_proxy is example import nitcorn::proxy diff --git a/lib/nitcorn/examples/src/restful_annot.nit b/lib/nitcorn/examples/src/restful_annot.nit index 7b8a407..8a7a225 100644 --- a/lib/nitcorn/examples/src/restful_annot.nit +++ b/lib/nitcorn/examples/src/restful_annot.nit @@ -13,7 +13,7 @@ # limitations under the License. # Example for the `restful` annotation documented at `lib/nitcorn/restful.nit` -module restful_annot +module restful_annot is example import nitcorn::restful import nitcorn::pthreads diff --git a/lib/nitcorn/examples/src/simple_file_server.nit b/lib/nitcorn/examples/src/simple_file_server.nit index 6613349..b0753fe 100644 --- a/lib/nitcorn/examples/src/simple_file_server.nit +++ b/lib/nitcorn/examples/src/simple_file_server.nit @@ -18,7 +18,7 @@ # # To be safe, it is recommended to run this program with its own username: # `sudo file_server -u nitcorn:www` -module simple_file_server +module simple_file_server is example import nitcorn import privileges diff --git a/lib/nitcorn/examples/src/test_restful_annot.nit b/lib/nitcorn/examples/src/test_restful_annot.nit index 8828162..850cce5 100644 --- a/lib/nitcorn/examples/src/test_restful_annot.nit +++ b/lib/nitcorn/examples/src/test_restful_annot.nit @@ -12,6 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +module test_restful_annot is example + import nitcorn::restful_annot import pthreads diff --git a/lib/pnacl/examples/converter/converter.nit b/lib/pnacl/examples/converter/converter.nit index 69966bd..cda360e 100644 --- a/lib/pnacl/examples/converter/converter.nit +++ b/lib/pnacl/examples/converter/converter.nit @@ -21,7 +21,7 @@ # Creates a converter and initializes it # Finally checks for dictionaries -import pnacl +import pnacl is example class Converter super PnaclApp diff --git a/lib/popcorn/examples/angular/example_angular.nit b/lib/popcorn/examples/angular/example_angular.nit index e229a8c..0da9194 100644 --- a/lib/popcorn/examples/angular/example_angular.nit +++ b/lib/popcorn/examples/angular/example_angular.nit @@ -14,6 +14,9 @@ # See the License for the specific language governing permissions and # limitations under the License. +# This is an example of how to use angular.js with popcorn +module example_angular is example + import popcorn import popcorn::pop_json diff --git a/lib/popcorn/examples/handlers/example_post_handler.nit b/lib/popcorn/examples/handlers/example_post_handler.nit index 826c165..d2eb6d3 100644 --- a/lib/popcorn/examples/handlers/example_post_handler.nit +++ b/lib/popcorn/examples/handlers/example_post_handler.nit @@ -14,6 +14,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +module example_post_handler is example + import popcorn import template diff --git a/lib/popcorn/examples/handlers/example_query_string.nit b/lib/popcorn/examples/handlers/example_query_string.nit index e8c6187..0af793c 100644 --- a/lib/popcorn/examples/handlers/example_query_string.nit +++ b/lib/popcorn/examples/handlers/example_query_string.nit @@ -14,6 +14,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +module example_query_string is example + import popcorn import template diff --git a/lib/popcorn/examples/hello_world/example_hello.nit b/lib/popcorn/examples/hello_world/example_hello.nit index fc9f3e5..46120bf 100644 --- a/lib/popcorn/examples/hello_world/example_hello.nit +++ b/lib/popcorn/examples/hello_world/example_hello.nit @@ -14,6 +14,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +module example_hello is example + import popcorn class HelloHandler diff --git a/lib/popcorn/examples/middlewares/example_advanced_logger.nit b/lib/popcorn/examples/middlewares/example_advanced_logger.nit index a8ad514..d77725f 100644 --- a/lib/popcorn/examples/middlewares/example_advanced_logger.nit +++ b/lib/popcorn/examples/middlewares/example_advanced_logger.nit @@ -14,6 +14,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +module example_advanced_logger is example + import popcorn import realtime diff --git a/lib/popcorn/examples/middlewares/example_html_error_handler.nit b/lib/popcorn/examples/middlewares/example_html_error_handler.nit index 5bd399c..d220075 100644 --- a/lib/popcorn/examples/middlewares/example_html_error_handler.nit +++ b/lib/popcorn/examples/middlewares/example_html_error_handler.nit @@ -14,6 +14,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +module example_html_error_handler is example + import popcorn import template diff --git a/lib/popcorn/examples/middlewares/example_simple_logger.nit b/lib/popcorn/examples/middlewares/example_simple_logger.nit index 73aff4f..354a992 100644 --- a/lib/popcorn/examples/middlewares/example_simple_logger.nit +++ b/lib/popcorn/examples/middlewares/example_simple_logger.nit @@ -14,6 +14,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +module example_simple_logger is example + import popcorn class SimpleLoggerHandler diff --git a/lib/popcorn/examples/mongodb/example_mongodb.nit b/lib/popcorn/examples/mongodb/example_mongodb.nit index 4f89f5b..b7de4fe 100644 --- a/lib/popcorn/examples/mongodb/example_mongodb.nit +++ b/lib/popcorn/examples/mongodb/example_mongodb.nit @@ -14,6 +14,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +module example_mongodb is example + import popcorn import mongodb import template diff --git a/lib/popcorn/examples/routing/example_glob_route.nit b/lib/popcorn/examples/routing/example_glob_route.nit index b33caec..2704358 100644 --- a/lib/popcorn/examples/routing/example_glob_route.nit +++ b/lib/popcorn/examples/routing/example_glob_route.nit @@ -14,6 +14,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +module example_glob_route is example + import popcorn class UserItem diff --git a/lib/popcorn/examples/routing/example_param_route.nit b/lib/popcorn/examples/routing/example_param_route.nit index f536771..c4b4b3e 100644 --- a/lib/popcorn/examples/routing/example_param_route.nit +++ b/lib/popcorn/examples/routing/example_param_route.nit @@ -14,6 +14,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +module example_param_route is example + import popcorn class UserHome diff --git a/lib/popcorn/examples/routing/example_router.nit b/lib/popcorn/examples/routing/example_router.nit index facce99..4027c39 100644 --- a/lib/popcorn/examples/routing/example_router.nit +++ b/lib/popcorn/examples/routing/example_router.nit @@ -14,6 +14,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +module example_router is example + import popcorn class AppHome diff --git a/lib/popcorn/examples/sessions/example_session.nit b/lib/popcorn/examples/sessions/example_session.nit index be79fb1..7bf0a82 100644 --- a/lib/popcorn/examples/sessions/example_session.nit +++ b/lib/popcorn/examples/sessions/example_session.nit @@ -14,6 +14,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +module example_session is example + import popcorn redef class Session diff --git a/lib/popcorn/examples/static_files/example_static.nit b/lib/popcorn/examples/static_files/example_static.nit index c3da6d0..f44a4c0 100644 --- a/lib/popcorn/examples/static_files/example_static.nit +++ b/lib/popcorn/examples/static_files/example_static.nit @@ -14,6 +14,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +module example_static is example + import popcorn var app = new App diff --git a/lib/popcorn/examples/static_files/example_static_default.nit b/lib/popcorn/examples/static_files/example_static_default.nit index 6aa5b34..8a7af54 100644 --- a/lib/popcorn/examples/static_files/example_static_default.nit +++ b/lib/popcorn/examples/static_files/example_static_default.nit @@ -14,6 +14,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +module example_static_default is example + import popcorn var app = new App diff --git a/lib/popcorn/examples/static_files/example_static_multiple.nit b/lib/popcorn/examples/static_files/example_static_multiple.nit index 1c730c6..6f925e1 100644 --- a/lib/popcorn/examples/static_files/example_static_multiple.nit +++ b/lib/popcorn/examples/static_files/example_static_multiple.nit @@ -14,6 +14,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +module example_static_multiple is example + import popcorn var app = new App diff --git a/lib/popcorn/examples/templates/example_templates.nit b/lib/popcorn/examples/templates/example_templates.nit index bddd3ed..194019a 100644 --- a/lib/popcorn/examples/templates/example_templates.nit +++ b/lib/popcorn/examples/templates/example_templates.nit @@ -14,6 +14,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +module example_templates is example + import popcorn import popcorn::pop_templates diff --git a/lib/privileges/examples/drop_privileges.nit b/lib/privileges/examples/drop_privileges.nit index a35ca17..016b8da 100644 --- a/lib/privileges/examples/drop_privileges.nit +++ b/lib/privileges/examples/drop_privileges.nit @@ -15,7 +15,7 @@ # limitations under the License. # Example using the privileges module to drop privileges from root -module drop_privileges +module drop_privileges is example import privileges diff --git a/lib/pthreads/examples/concurrent_array_and_barrier.nit b/lib/pthreads/examples/concurrent_array_and_barrier.nit index 750f976..f32e6c1 100644 --- a/lib/pthreads/examples/concurrent_array_and_barrier.nit +++ b/lib/pthreads/examples/concurrent_array_and_barrier.nit @@ -18,7 +18,7 @@ # # 20 threads share an array and a barrier. They each insert 1000 strings into # the array and wait at a barrier before finishing. -module concurrent_array_and_barrier +module concurrent_array_and_barrier is example import pthreads::concurrent_collections diff --git a/lib/pthreads/examples/jointask_example.nit b/lib/pthreads/examples/jointask_example.nit index 3d12f6f..b2dd369 100644 --- a/lib/pthreads/examples/jointask_example.nit +++ b/lib/pthreads/examples/jointask_example.nit @@ -13,7 +13,7 @@ # limitations under the License. # Simple example of joinable task using threadpool -module jointask_example +module jointask_example is example import threadpool diff --git a/lib/pthreads/examples/threaded_example.nit b/lib/pthreads/examples/threaded_example.nit index fb0609b..66b2076 100644 --- a/lib/pthreads/examples/threaded_example.nit +++ b/lib/pthreads/examples/threaded_example.nit @@ -15,7 +15,7 @@ # limitations under the License. # test for threaded annotation -module threaded_example +module threaded_example is example import pthreads diff --git a/lib/pthreads/examples/threadpool_example.nit b/lib/pthreads/examples/threadpool_example.nit index fec1ae2..6647386 100644 --- a/lib/pthreads/examples/threadpool_example.nit +++ b/lib/pthreads/examples/threadpool_example.nit @@ -13,7 +13,7 @@ # limitations under the License. # Simple example using threadpool -module threadpool_example +module threadpool_example is example import threadpool diff --git a/lib/sdl2/examples/minimal/src/minimal.nit b/lib/sdl2/examples/minimal/src/minimal.nit index 7666c10..534f86a 100644 --- a/lib/sdl2/examples/minimal/src/minimal.nit +++ b/lib/sdl2/examples/minimal/src/minimal.nit @@ -15,7 +15,7 @@ # limitations under the License. # An example to test and demonstrate the `sdl2` lib with `image` and `events` -module minimal +module minimal is example import sdl2::all diff --git a/lib/serialization/examples/custom_serialization.nit b/lib/serialization/examples/custom_serialization.nit index 083bcfb..ef95f91 100644 --- a/lib/serialization/examples/custom_serialization.nit +++ b/lib/serialization/examples/custom_serialization.nit @@ -29,7 +29,7 @@ # # The advantage of the approach is that it is done programmatically so can be adapted to real complex use cases. # Basically, this is half-way between the full automatic serialization and the full manual serialisation. -module custom_serialization +module custom_serialization is example import serialization import json::serialization_write diff --git a/lib/template/examples/tmpl_composer.nit b/lib/template/examples/tmpl_composer.nit index 3150c5f..c95fc62 100644 --- a/lib/template/examples/tmpl_composer.nit +++ b/lib/template/examples/tmpl_composer.nit @@ -12,6 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +module tmpl_composer is example + import template ### Here, definition of the specific templates diff --git a/lib/vsm/.vsm.nit.swn b/lib/vsm/.vsm.nit.swn new file mode 100644 index 0000000000000000000000000000000000000000..4faa9eb8a8bbc1e2a67e2ba39e08551107bebdcd GIT binary patch literal 16384 zcmeI2UyK_^9ml8qcW6>nkdXR-ez66$FV5bbuOijaL~`#gsUde)oi8cTaXOE^__cyTo-3Fc!*#_%Jp`0i(csP@omnk3M)%j1@*l zxOOIem_B*$nfKtxR51z|1&jhl0i%FXz$jo8FbWt2{$CY{nsSn1&jhl0i%FXz$jo8FbWt2i~>dhqkvJsDDeJMK-xkSJ|x6nKa9TN z`~U9w|K>eHyaK)oPJmB=d%<503Grv}ZEyx005=W_@k8(f@Fchj#=+n37UE6t26z&5 zfD2Z^SHJ?807Y>7<3jum{0jUMJO#c9Cc%I4TZDguJK&GtHSiMnDR>Ti3w#ZPzy=bW z0uO>5xDR|9+(`-X8}KaH03A>Q$H3j-t&d^M;Md^0;2P+FJop^==SPKj9lQ!|fLFk? z;78yhSOXWpm%$goL%;$A{`C>m2XBEl!E4}U@HDsv9tY>a32;A1gTvqucn5RyHsCor zfbwm;{~r7pJOR#v!{83)@izD^xDH+b-v`ft?|?RFf|KAr@D7qXe*(9_O>hG|1!|xI z9tK5l1PJgSB#CZ;tKbT7!73Q^l}e@Ren7TgBgf;n5Pt-&I&}*1w%={1LC25Nh&4jd zit?!Ddy(U{6xVLcfI_}cfx6IAVPw_(&>6@Zj0SIXPt$!y+sNDj7oq2jt;$0Eh8 zcz)0rr<1NPBRvHf+Su3-sSL?5R6&ILY+*U!l592ue=R#^9ebdV=Z#=w6h1T5UPwpj zMfRDL9@nL@q_nO}g`~8mOQR_9g}vH9cXw@p>v4N=3*A!OLbtTp0`YL$=$NNEG;{jV zv#J*P0lSEY$p5Qcy0mub5^S<-qck)`1+pxQj?kK?OF6A_1(s|)zoN8W0 zl~q^KZ1p@;Uxd31P57>hLR=vZXMXT_Y6(vx$CZH-t!H(Q#;H7Y`ebh3Kp)jlt*w>Y zW4Yw1$MfF|91kmE4@0)dbR&9Kn}T*W%G1BUvjQ(HHfoP8q-%Z43B_vPdO}h57E~PW zW4pw=_EhLDn|NWO*uOGS+`e!MdwCk&>IubuPbhBpG`fqYzBL%>VA8Qf_$4d(LA2s8 z`<`@3dNx5XYAET2SVY*Quqf8GnPV$_1gS~a;_;nw+SvDaRq`%{>5tZRVBr?RX`l5)3Uie zQ1kKDx+rQcLW7bmC__WuQQK)KFLZn_97=YQP>-t>DjS@AbdHArg`~Tzs)2NBgn{E8*Y2sx{oEpJsJpz=C4Q<&E(esB0oq`c*rX6xr=1#R zQ1Q^pO7&mTO|ePXR5hoL9=Hg?mP8yb``9==ZXIFMa6%mcv10UCY5tMfGxPLVac-_S zGhdo2)9f5g%+5@f=1a3PD4nF@%sKi}X=XA{%0UaP2ggasQGxk(9c6QeY$wFLR9g{( zX-AJ)pMC?(F62rV%Ty|->EU9zRAzb4crH8U5A_Z{mrxZ8uZb3FdM9>eM@QmvpyGhV zWOlIS>Iez_dep&U)|wJtD^b)OA0F;>I+nzAttiV6mht;@tzbBOx->C0Q=U4CC%>+8 z&Tmmea->8OekEeKiBkOBO>`$2p_A*0rH3aJ!WOfD!68-^gsG_}!kG^%EDT~@Q3s;+ z&lGEw`0E#{sQcKxlSiZlJW+)HQI;n*om5KazMwli-)k1lHzigbIy+OEr)>Yw@f-VY zAn^DpX9+(4{~YIUh4VU}|38}?=J@P?9sB}(4_pIRz&F6x!6GPuW8m{30}g?M;BDjt zZh<$z@4$8NBDewqZ~^2&7Tgawhwu-y{|E3ocpm%=JPkbH0Pdd+%*!ZX6fg=H1&jhl z0i%FXz$jo8Fbce{71)`6uUdV%orjK}AlY}JKMl`kM;v6cGEdbUaxlpF#5wwCy{T|E zpMJDBH#IpcxR9eit{kII$gYrQ!2#i!p2TB{_U;w<=hH@5{h^Rtt)$<1!B#%YQhnCzyo^dNN# zhP`$DCzX<7zstG!i^W779GR1}TOuqn!#jkHB`wBPIH4vt8{(t@G9DE@4H(GI_()~} vdFD`0ki~D=