aboutsummaryrefslogtreecommitdiff
path: root/module/main.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-05-01 13:08:25 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-05-01 13:08:25 +0200
commit29cb0b9eb8e544d0f2b07eb202d90bed4f20eeea (patch)
tree92c5f2a5271911930a15e58df862273b3a755e5d /module/main.scm
parentServer server any subdir under static. (diff)
parentChange call signature for [gs]etf. (diff)
downloadcalp-29cb0b9eb8e544d0f2b07eb202d90bed4f20eeea.tar.gz
calp-29cb0b9eb8e544d0f2b07eb202d90bed4f20eeea.tar.xz
Merge branch 'app'.
The app objects both makes the whole program sort of behave like one class in some object oriented languages, with an implicitly (actually hiddenly explicitly) passed 'app' argument to all methods. Multiple concurrent apps should be supported, but is of now untested. The app is also configured to lazily bind all its fields, which means that almost all loading is now lazy!
Diffstat (limited to 'module/main.scm')
-rwxr-xr-xmodule/main.scm8
1 files changed, 8 insertions, 0 deletions
diff --git a/module/main.scm b/module/main.scm
index b2899014..332d9990 100755
--- a/module/main.scm
+++ b/module/main.scm
@@ -13,6 +13,7 @@
(util)
(util io)
(util time)
+ (util app)
((entry-points html) :prefix html-)
((entry-points terminal) :prefix terminal-)
@@ -31,6 +32,7 @@
)
+
(define options
'((statprof (value optional))
(repl (value optional))
@@ -56,6 +58,12 @@
(when (file-exists? config-file)
(primitive-load config-file)))
+
+ ;; (current-app (make-app))
+
+ ((@ (vcomponent) init-app) (get-config 'calendar-files))
+ ((@ (datetime app) init-app))
+
(let ((ropt (ornull (option-ref opts '() '())
'("term"))))
((case (string->symbol (car ropt))