! Copyright (C) 2008 James Cash, Daniel Ehrenberg, Chris Double.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors combinators.short-circuit kernel locals math
-sequences ;
+parser sequences ;
IN: lists
! List Protocol
GENERIC: >list ( object -- list )
M: list >list ;
+
+M: sequence >list sequence>list ;
+
+SYNTAX: L{ \ } [ sequence>list ] parse-literal ;
\ No newline at end of file
USING: accessors arrays assocs byte-arrays byte-vectors classes
classes.algebra.private classes.maybe classes.private
classes.tuple combinators continuations effects generic
-hash-sets hashtables io.pathnames io.styles kernel make math
-math.order math.parser namespaces prettyprint.config
+hash-sets hashtables io.pathnames io.styles kernel lists make
+math math.order math.parser namespaces prettyprint.config
prettyprint.custom prettyprint.sections prettyprint.stylesheet
quotations sbufs sequences strings vectors words ;
QUALIFIED: sets
M: byte-array pprint-delims drop \ B{ \ } ;
M: byte-vector pprint-delims drop \ BV{ \ } ;
M: vector pprint-delims drop \ V{ \ } ;
+M: list pprint-delims drop \ L{ \ } ;
M: hashtable pprint-delims drop \ H{ \ } ;
M: tuple pprint-delims drop \ T{ \ } ;
M: wrapper pprint-delims drop \ W{ \ } ;
M: vector >pprint-sequence ;
M: byte-vector >pprint-sequence ;
M: callable >pprint-sequence ;
+M: list >pprint-sequence list>array ;
M: hashtable >pprint-sequence >alist ;
M: wrapper >pprint-sequence wrapped>> 1array ;
M: callstack >pprint-sequence callstack>array ;
nesting-limit [ dup [ 1 + ] [ f ] if* ] change
[ nesting-limit set ] curry finally ; inline
+M: list pprint* pprint-object ;
M: hashtable pprint*
[ pprint-object ] with-extra-nesting-level ;
M: curried pprint* pprint-object ;