Browse code
chore: cleanup unneeded dependencies
Edward Langley authored on 12/10/2019 00:53:07
Showing 2 changed files
Showing 2 changed files
... | ... |
@@ -10,7 +10,7 @@ |
10 | 10 |
:aws-sdk |
11 | 11 |
:aws-sdk/services/sts |
12 | 12 |
:cells |
13 |
- :cl-yaml |
|
13 |
+ :fset |
|
14 | 14 |
:cxml |
15 | 15 |
:daydreamer |
16 | 16 |
:fwoar-lisputils |
... | ... |
@@ -22,7 +22,8 @@ |
22 | 22 |
:serial t |
23 | 23 |
:components ((:module "src" |
24 | 24 |
:serial t |
25 |
- :components ((:file "package") |
|
25 |
+ :components ((:file "pprint-setup") |
|
26 |
+ (:file "package") |
|
26 | 27 |
(:file "store") |
27 | 28 |
(:file "aws-dispatcher") |
28 | 29 |
(:file "domain") |
29 | 30 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,29 @@ |
1 |
+(defpackage :mfa-tool.pprint-setup |
|
2 |
+ (:use :cl ) |
|
3 |
+ (:export |
|
4 |
+ #:pprint-hashtable |
|
5 |
+ #:setup-pprint)) |
|
6 |
+ |
|
7 |
+(in-package :mfa-tool.pprint-setup) |
|
8 |
+ |
|
9 |
+(defparameter *old-pprint-dispatch* *print-pprint-dispatch*) |
|
10 |
+ |
|
11 |
+(defun pprint-hashtable (s hash-table) |
|
12 |
+ (pprint-logical-block (s nil) |
|
13 |
+ (princ "#<hash-table" s) |
|
14 |
+ (let ((v (fset:convert 'list (fset:convert 'fset:map hash-table)))) |
|
15 |
+ (when v |
|
16 |
+ (pprint-logical-block (s v) |
|
17 |
+ (pprint-indent :block 0 s) |
|
18 |
+ (loop do |
|
19 |
+ (destructuring-bind (key . value) (pprint-pop) |
|
20 |
+ (format s " ~s: ~s" key value) |
|
21 |
+ (pprint-exit-if-list-exhausted) |
|
22 |
+ (princ ", " s) |
|
23 |
+ (pprint-newline :mandatory s)))))) |
|
24 |
+ (princ #\> s))) |
|
25 |
+ |
|
26 |
+(defun setup-pprint () |
|
27 |
+ (setf *print-pprint-dispatch* (copy-pprint-dispatch *old-pprint-dispatch*) |
|
28 |
+ *print-pretty* t) |
|
29 |
+ (set-pprint-dispatch 'hash-table 'pprint-hashtable)) |