summaryrefslogtreecommitdiff
path: root/catbird/config.scm
blob: a010bc13ace18e078a922a83f5d47e0e49b4de1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
(define-module (catbird config)
  #:use-module (oop goops)
  #:export (developer-mode?
            <catbird-metaclass>
            define-root-class))

(define developer-mode?
  (equal? (getenv "CATBIRD_DEV_MODE") "1"))

(define <catbird-metaclass>
  (if developer-mode? <redefinable-class> <class>))

(define-syntax-rule (define-root-class name (supers ...) args ...)
  (define-class name (supers ...)
    args ...
    #:metaclass <catbird-metaclass>))