utils: Add dotit.

This commit is contained in:
Sergiu Ivanov 2020-02-22 21:00:34 +01:00
parent 8357f70304
commit 3ff1b645d5

View file

@ -4,8 +4,9 @@
;;; Various utilities. ;;; Various utilities.
(require (for-syntax syntax/parse) (require
(for-syntax racket/list)) graph
(for-syntax syntax/parse racket/list))
(provide (provide
;; Functions ;; Functions
@ -23,7 +24,7 @@
[string-variable-mapping? contract?] [string-variable-mapping? contract?]
[general-pair/c (-> contract? contract? contract?)]) [general-pair/c (-> contract? contract? contract?)])
;; Syntax ;; Syntax
auto-hash-ref/explicit auto-hash-ref/: sgfy unorg) auto-hash-ref/explicit auto-hash-ref/: sgfy unorg dotit)
;;; =================== ;;; ===================
;;; HashTable Injection ;;; HashTable Injection
@ -202,3 +203,6 @@
;;; A synonym for read-org-variable-mapping. ;;; A synonym for read-org-variable-mapping.
(define-syntax-rule (unorg str) (read-org-variable-mapping str)) (define-syntax-rule (unorg str) (read-org-variable-mapping str))
;;; Typeset the graph via graphviz and display it.
(define-syntax-rule (dotit gr) (display (graphviz gr)))