]> gitweb.factorcode.org Git - factor.git/commitdiff
linked-assocs.prettyprint: only print LH{ } for linked-assoc classes.
authorJohn Benediktsson <mrjbq7@gmail.com>
Fri, 3 Mar 2017 00:09:46 +0000 (16:09 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Fri, 3 Mar 2017 00:09:46 +0000 (16:09 -0800)
Not subclasses.

basis/linked-assocs/prettyprint/prettyprint.factor

index 25d87e2b7c4bc5c7a720a87122840284328cc108..7fc4cb83ca54dbcaf7cd54c02b374aeb866da59b 100644 (file)
@@ -1,8 +1,9 @@
-USING: accessors assocs hashtables kernel linked-assocs
+USING: accessors assocs classes hashtables kernel linked-assocs
 prettyprint.backend prettyprint.custom ;
 IN: linked-assocs.prettyprint
 
-PREDICATE: linked-hash < linked-assoc assoc>> hashtable? ;
+PREDICATE: linked-hash < linked-assoc
+    [ class-of linked-assoc = ] [ assoc>> hashtable? ] bi and ;
 
 M: linked-hash pprint-delims drop \ LH{ \ } ;