From 3ff1b645d571edac327a375c91223e8df7d0b4af Mon Sep 17 00:00:00 2001 From: Sergiu Ivanov Date: Sat, 22 Feb 2020 21:00:34 +0100 Subject: [PATCH] utils: Add dotit. --- utils.rkt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/utils.rkt b/utils.rkt index ab5612d..deaa3a3 100644 --- a/utils.rkt +++ b/utils.rkt @@ -4,8 +4,9 @@ ;;; Various utilities. -(require (for-syntax syntax/parse) - (for-syntax racket/list)) +(require + graph + (for-syntax syntax/parse racket/list)) (provide ;; Functions @@ -23,7 +24,7 @@ [string-variable-mapping? contract?] [general-pair/c (-> contract? contract? contract?)]) ;; Syntax - auto-hash-ref/explicit auto-hash-ref/: sgfy unorg) + auto-hash-ref/explicit auto-hash-ref/: sgfy unorg dotit) ;;; =================== ;;; HashTable Injection @@ -202,3 +203,6 @@ ;;; A synonym for read-org-variable-mapping. (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)))