diff --git a/basis/linked-assocs/linked-assocs.factor b/basis/linked-assocs/linked-assocs.factor index 8d06d39366..3dfe788822 100644 --- a/basis/linked-assocs/linked-assocs.factor +++ b/basis/linked-assocs/linked-assocs.factor @@ -1,8 +1,7 @@ ! Copyright (C) 2008 Slava Pestov, James Cash. ! See http://factorcode.org/license.txt for BSD license. USING: accessors arrays assocs classes deques dlists fry -hashtables kernel parser prettyprint.backend prettyprint.custom -sequences.private ; +hashtables kernel parser sequences.private vocabs.loader ; IN: linked-assocs TUPLE: linked-assoc { assoc read-only } { dlist dlist read-only } ; @@ -64,13 +63,4 @@ M: linked-assoc equal? SYNTAX: LH{ \ } [ check-hashtable >linked-hash ] parse-literal ; -PREDICATE: linked-hash < linked-assoc assoc>> hashtable? ; - -M: linked-hash pprint-delims drop \ LH{ \ } ; - -M: linked-hash >pprint-sequence >alist ; - -M: linked-hash pprint-narrow? drop t ; - -M: linked-hash pprint* - [ pprint-object ] with-extra-nesting-level ; +{ "linked-assocs" "prettyprint" } "linked-assocs.prettyprint" require-when diff --git a/basis/linked-assocs/prettyprint/prettyprint.factor b/basis/linked-assocs/prettyprint/prettyprint.factor new file mode 100644 index 0000000000..25d87e2b7c --- /dev/null +++ b/basis/linked-assocs/prettyprint/prettyprint.factor @@ -0,0 +1,14 @@ +USING: accessors assocs hashtables kernel linked-assocs +prettyprint.backend prettyprint.custom ; +IN: linked-assocs.prettyprint + +PREDICATE: linked-hash < linked-assoc assoc>> hashtable? ; + +M: linked-hash pprint-delims drop \ LH{ \ } ; + +M: linked-hash >pprint-sequence >alist ; + +M: linked-hash pprint-narrow? drop t ; + +M: linked-hash pprint* + [ pprint-object ] with-extra-nesting-level ;