aboutsummaryrefslogtreecommitdiff
path: root/module/parameters.scm
blob: 45b8862b69cdc25214ad57dd5a8e3ab3299e9fc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
;;; 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 "Bad value to config"))
    v))

(define-public calendar-files
  (make-parameter
   '() (ensure list?)))

(define-public summary-filter
  (make-parameter (lambda (_ a) a) (ensure procedure?)))