blob: d58c63335d8760ce2b4a149673de99e6fafbf540 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
;;; Commentary:
;; This file should define all global configurable variables which
;; doesn't belong anywhere else. The config module should then import
;; this module, and set all configs as needed. The config module
;; should also be able to set configs gotten from other parts.
;;; Code:
(define-module (parameters))
(define (ensure pred?)
(lambda (v)
(unless (pred? v)
(error (format #f "Value [~s] doesn't satisfy condition ~a"
v (or (procedure-name pred?) ""))))
v))
(define-public calendar-files
(make-parameter
'() (ensure list?)))
(define-public summary-filter
(make-parameter (lambda (_ a) a) (ensure procedure?)))
;; ev x str -> sxml
(define-public description-filter
(make-parameter (lambda (_ a) a) (ensure procedure?)))
(use-modules (datetime util))
(define-public week-start
(make-parameter sun (ensure (lambda (x) (<= sun x sat)))))
|