diff --git a/tk/Makefile b/tk/Makefile index bd79cbd..0ae0b4c 100644 --- a/tk/Makefile +++ b/tk/Makefile @@ -1,7 +1,6 @@ TARGET := $(shell guile -c "(display (%site-dir))") CCACHE := $(shell guile -c "(display(%site-ccache-dir))") -OBJ := listlogic.go ports.go mcron.go - +OBJ := listlogic.go mcron.go ports.go short.go .PHONY: all clean install uninstall all: $(OBJ) diff --git a/tk/short.scm b/tk/short.scm new file mode 100644 index 0000000..fd4de5a --- /dev/null +++ b/tk/short.scm @@ -0,0 +1,15 @@ +(define-module (tk short) + #:export (ss> ss< + ssa>) + #:duplicates (warn-override-core warn)) + +(define ss> string->symbol) +(define ss< symbol->string) + +;; Wraps up the common (string->symbol (string-append ...)) form +(define-syntax ssa> + (syntax-rules () + ((ssa> $string . $strings) + (ss> (string-append $string . $strings))) + ((ssa>) + (syntax-error "ssa> needs at least one string argument"))))