aboutsummaryrefslogtreecommitdiff
path: root/module/web
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-06-23 03:23:44 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2022-06-23 03:48:22 +0200
commit1976980d4a272fb7fc3694c734bfc6825edfc721 (patch)
tree8460db1176c64895e9968447588953fac85fe7d6 /module/web
parentRemove all inline use-modules. (diff)
downloadcalp-1976980d4a272fb7fc3694c734bfc6825edfc721.tar.gz
calp-1976980d4a272fb7fc3694c734bfc6825edfc721.tar.xz
Centralize (almost) all exports to :export in define-module.
Diffstat (limited to 'module/web')
-rw-r--r--module/web/http/make-routes.scm5
-rw-r--r--module/web/query.scm5
-rw-r--r--module/web/uri-query.scm3
3 files changed, 8 insertions, 5 deletions
diff --git a/module/web/http/make-routes.scm b/module/web/http/make-routes.scm
index f5277ca5..3005200b 100644
--- a/module/web/http/make-routes.scm
+++ b/module/web/http/make-routes.scm
@@ -1,16 +1,17 @@
(define-module (web http make-routes)
- :export (make-routes)
:use-module (hnh util)
:use-module (ice-9 regex)
:use-module (ice-9 match)
:use-module (ice-9 curried-definitions)
:use-module (srfi srfi-1)
:use-module (srfi srfi-71)
+ :export (parse-endpoint-string
+ make-routes)
)
-(define-public (parse-endpoint-string str)
+(define (parse-endpoint-string str)
(let ((rx (make-regexp ":([^/.]+)(\\{([^}]+)\\})?([.])?")))
(let loop ((str str)
(string "")
diff --git a/module/web/query.scm b/module/web/query.scm
index 2d62b45d..4a1abf66 100644
--- a/module/web/query.scm
+++ b/module/web/query.scm
@@ -2,9 +2,10 @@
:use-module (hnh util)
:use-module (srfi srfi-1)
:use-module (srfi srfi-71)
- :use-module (web uri))
+ :use-module (web uri)
+ :export (parse-query))
-(define*-public (parse-query query-string optional: (encoding "UTF-8"))
+(define* (parse-query query-string optional: (encoding "UTF-8"))
(unless (or (not query-string) (string-null? query-string))
(fold (lambda (str list)
;; only split on the first equal.
diff --git a/module/web/uri-query.scm b/module/web/uri-query.scm
index 56f3aef9..adf99803 100644
--- a/module/web/uri-query.scm
+++ b/module/web/uri-query.scm
@@ -1,6 +1,7 @@
(define-module (web uri-query)
:use-module ((hnh util) :select (->quoted-string))
:use-module ((web uri) :select (uri-encode))
+ :export (encode-query-parameters)
)
;; TODO why this format for values?
@@ -8,7 +9,7 @@
;; TODO why isn't this in the same module as `parse-query'?
;; TODO why isn't this on the same format as `parse-query'?
-(define-public (encode-query-parameters parameters)
+(define (encode-query-parameters parameters)
(string-join
(map (lambda (p)
(format #f "~a=~a"