aboutsummaryrefslogtreecommitdiff
path: root/main.rkt
diff options
context:
space:
mode:
authorMasaya Tojo <masaya@tojo.tokyo>2024-03-18 01:04:22 +0900
committerMasaya Tojo <masaya@tojo.tokyo>2024-03-18 01:04:22 +0900
commit9f7c2e9bf63cb69a1cb8e00545e198338ca05428 (patch)
tree8b09c743ed144164102da5d5b69c20dd90ad6880 /main.rkt
parent73ccaa0dc1d343d9a84b4f940479a0e128a8a7b5 (diff)
Execute raco pkg new.
Diffstat (limited to 'main.rkt')
-rw-r--r--main.rkt50
1 files changed, 50 insertions, 0 deletions
diff --git a/main.rkt b/main.rkt
new file mode 100644
index 0000000..7e16dd4
--- /dev/null
+++ b/main.rkt
@@ -0,0 +1,50 @@
+#lang racket/base
+
+(module+ test
+ (require rackunit))
+
+;; Notice
+;; To install (from within the package directory):
+;; $ raco pkg install
+;; To install (once uploaded to pkgs.racket-lang.org):
+;; $ raco pkg install <<name>>
+;; To uninstall:
+;; $ raco pkg remove <<name>>
+;; To view documentation:
+;; $ raco docs <<name>>
+;;
+;; For your convenience, we have included LICENSE-MIT and LICENSE-APACHE files.
+;; If you would prefer to use a different license, replace those files with the
+;; desired license.
+;;
+;; Some users like to add a `private/` directory, place auxiliary files there,
+;; and require them in `main.rkt`.
+;;
+;; See the current version of the racket style guide here:
+;; http://docs.racket-lang.org/style/index.html
+
+;; Code here
+
+
+
+(module+ test
+ ;; Any code in this `test` submodule runs when this file is run using DrRacket
+ ;; or with `raco test`. The code here does not run when this file is
+ ;; required by another module.
+
+ (check-equal? (+ 2 2) 4))
+
+(module+ main
+ ;; (Optional) main submodule. Put code here if you need it to be executed when
+ ;; this file is run using DrRacket or the `racket` executable. The code here
+ ;; does not run when this file is required by another module. Documentation:
+ ;; http://docs.racket-lang.org/guide/Module_Syntax.html#%28part._main-and-test%29
+
+ (require racket/cmdline)
+ (define who (box "world"))
+ (command-line
+ #:program "my-program"
+ #:once-each
+ [("-n" "--name") name "Who to say hello to" (set-box! who name)]
+ #:args ()
+ (printf "hello ~a~n" (unbox who))))