parent
3c789cb0a7
commit
114f58d894
|
@ -1,7 +1,7 @@
|
||||||
! Copyright (C) 2008 James Cash, Daniel Ehrenberg, Chris Double.
|
! Copyright (C) 2008 James Cash, Daniel Ehrenberg, Chris Double.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors combinators.short-circuit kernel locals math
|
USING: accessors combinators.short-circuit kernel locals math
|
||||||
sequences ;
|
parser sequences ;
|
||||||
IN: lists
|
IN: lists
|
||||||
|
|
||||||
! List Protocol
|
! List Protocol
|
||||||
|
@ -102,3 +102,7 @@ INSTANCE: +nil+ list
|
||||||
GENERIC: >list ( object -- list )
|
GENERIC: >list ( object -- list )
|
||||||
|
|
||||||
M: list >list ;
|
M: list >list ;
|
||||||
|
|
||||||
|
M: sequence >list sequence>list ;
|
||||||
|
|
||||||
|
SYNTAX: L{ \ } [ sequence>list ] parse-literal ;
|
|
@ -3,8 +3,8 @@
|
||||||
USING: accessors arrays assocs byte-arrays byte-vectors classes
|
USING: accessors arrays assocs byte-arrays byte-vectors classes
|
||||||
classes.algebra.private classes.maybe classes.private
|
classes.algebra.private classes.maybe classes.private
|
||||||
classes.tuple combinators continuations effects generic
|
classes.tuple combinators continuations effects generic
|
||||||
hash-sets hashtables io.pathnames io.styles kernel make math
|
hash-sets hashtables io.pathnames io.styles kernel lists make
|
||||||
math.order math.parser namespaces prettyprint.config
|
math math.order math.parser namespaces prettyprint.config
|
||||||
prettyprint.custom prettyprint.sections prettyprint.stylesheet
|
prettyprint.custom prettyprint.sections prettyprint.stylesheet
|
||||||
quotations sbufs sequences strings vectors words ;
|
quotations sbufs sequences strings vectors words ;
|
||||||
QUALIFIED: sets
|
QUALIFIED: sets
|
||||||
|
@ -213,6 +213,7 @@ M: array pprint-delims drop \ { \ } ;
|
||||||
M: byte-array pprint-delims drop \ B{ \ } ;
|
M: byte-array pprint-delims drop \ B{ \ } ;
|
||||||
M: byte-vector pprint-delims drop \ BV{ \ } ;
|
M: byte-vector pprint-delims drop \ BV{ \ } ;
|
||||||
M: vector pprint-delims drop \ V{ \ } ;
|
M: vector pprint-delims drop \ V{ \ } ;
|
||||||
|
M: list pprint-delims drop \ L{ \ } ;
|
||||||
M: hashtable pprint-delims drop \ H{ \ } ;
|
M: hashtable pprint-delims drop \ H{ \ } ;
|
||||||
M: tuple pprint-delims drop \ T{ \ } ;
|
M: tuple pprint-delims drop \ T{ \ } ;
|
||||||
M: wrapper pprint-delims drop \ W{ \ } ;
|
M: wrapper pprint-delims drop \ W{ \ } ;
|
||||||
|
@ -227,6 +228,7 @@ M: object >pprint-sequence ;
|
||||||
M: vector >pprint-sequence ;
|
M: vector >pprint-sequence ;
|
||||||
M: byte-vector >pprint-sequence ;
|
M: byte-vector >pprint-sequence ;
|
||||||
M: callable >pprint-sequence ;
|
M: callable >pprint-sequence ;
|
||||||
|
M: list >pprint-sequence list>array ;
|
||||||
M: hashtable >pprint-sequence >alist ;
|
M: hashtable >pprint-sequence >alist ;
|
||||||
M: wrapper >pprint-sequence wrapped>> 1array ;
|
M: wrapper >pprint-sequence wrapped>> 1array ;
|
||||||
M: callstack >pprint-sequence callstack>array ;
|
M: callstack >pprint-sequence callstack>array ;
|
||||||
|
@ -268,6 +270,7 @@ M: byte-vector pprint* pprint-object ;
|
||||||
nesting-limit [ dup [ 1 + ] [ f ] if* ] change
|
nesting-limit [ dup [ 1 + ] [ f ] if* ] change
|
||||||
[ nesting-limit set ] curry finally ; inline
|
[ nesting-limit set ] curry finally ; inline
|
||||||
|
|
||||||
|
M: list pprint* pprint-object ;
|
||||||
M: hashtable pprint*
|
M: hashtable pprint*
|
||||||
[ pprint-object ] with-extra-nesting-level ;
|
[ pprint-object ] with-extra-nesting-level ;
|
||||||
M: curried pprint* pprint-object ;
|
M: curried pprint* pprint-object ;
|
||||||
|
|
Loading…
Reference in New Issue