From 8e7666108daaeb7a1964cef2cbcdfd8cab0b5133 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Tue, 22 Feb 2022 21:06:03 +0100 Subject: Add some TODO comments. --- module/calp/terminal.scm | 3 +++ module/calp/util/config.scm | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'module') diff --git a/module/calp/terminal.scm b/module/calp/terminal.scm index cd1d0c9d..c83e76ce 100644 --- a/module/calp/terminal.scm +++ b/module/calp/terminal.scm @@ -31,6 +31,9 @@ #:export (main-loop)) + +;;; TODO change all hard coded escape sequences to proper markup + (define-values (height width) (get-terminal-size)) (define (open-in-editor fname) diff --git a/module/calp/util/config.scm b/module/calp/util/config.scm index 2fe2b9b0..8ecd7a81 100644 --- a/module/calp/util/config.scm +++ b/module/calp/util/config.scm @@ -37,6 +37,7 @@ (define (define-config% name default-value kwargs) (for (key value) in (group kwargs 2) + ;; TODO un-smart this (set! ((or (hashq-ref config-properties key) (error "Missing config protperty slot " key)) name) @@ -64,6 +65,7 @@ (if (eq? default %uniq) (let ((v (hashq-ref config-values key %uniq))) (when (eq? v %uniq) + ;; TODO throw descript error (error "Missing config" key)) v) (hashq-ref config-values key default))) @@ -71,8 +73,8 @@ (define-public ((ensure predicate) value) - (if (not (predicate value)) - #f value)) + (if (predicate value) + value #f)) @@ -106,6 +108,8 @@ (export format-procedure) +;; TODO break this up into separate `get-all-configuration-items' and +;; `format-configuration-items' procedures (define-public (get-configuration-documentation) (define groups (group-by (compose source-module car) -- cgit v1.2.3