make simplify-callable prettyprinting an optional load in extra

db4
Joe Groff 2009-08-07 16:19:46 -04:00
parent 556904cf57
commit fcfe16d8d0
6 changed files with 12 additions and 10 deletions

View File

@ -3,9 +3,8 @@
USING: accessors arrays byte-arrays byte-vectors generic hashtables
assocs kernel math namespaces make sequences strings sbufs vectors
words prettyprint.config prettyprint.custom prettyprint.sections
prettyprint.backend.callables quotations io io.pathnames io.styles
math.parser effects classes.tuple math.order classes.tuple.private
classes combinators colors ;
quotations io io.pathnames io.styles math.parser effects classes.tuple
math.order classes.tuple.private classes combinators colors ;
IN: prettyprint.backend
M: effect pprint* effect>string "(" ")" surround text ;
@ -178,7 +177,7 @@ M: callstack pprint-delims drop \ CS{ \ } ;
M: object >pprint-sequence ;
M: vector >pprint-sequence ;
M: byte-vector >pprint-sequence ;
M: callable >pprint-sequence simplify-callable ;
M: callable >pprint-sequence ;
M: hashtable >pprint-sequence >alist ;
M: wrapper >pprint-sequence wrapped>> 1array ;
M: callstack >pprint-sequence callstack>array ;

View File

@ -1,5 +1,5 @@
USING: help help.markup help.syntax ;
IN: prettyprint.backend.callables
USING: help help.markup help.syntax kernel quotations ;
IN: prettyprint.callables
HELP: simplify-callable
{ $values { "quot" callable } { "quot'" callable } }

View File

@ -1,7 +1,7 @@
! (c) 2009 Joe Groff bsd license
USING: kernel math prettyprint prettyprint.backend.callables
USING: kernel math prettyprint prettyprint.callables
tools.test ;
IN: prettyprint.backend.callables
IN: prettyprint.callables.tests
[ [ dip ] ] [ [ dip ] simplify-callable ] unit-test
[ [ [ + ] dip ] ] [ [ [ + ] dip ] simplify-callable ] unit-test

View File

@ -1,7 +1,8 @@
! (c) 2009 Joe Groff bsd license
USING: combinators combinators.short-circuit generalizations
kernel macros math math.ranges quotations sequences words ;
IN: prettyprint.backend.callables
kernel macros math math.ranges prettyprint.custom quotations
sequences words ;
IN: prettyprint.callables
<PRIVATE
@ -70,3 +71,5 @@ PRIVATE>
: simplify-callable ( quot -- quot' )
[ (simplify-callable) ] to-fixed-point ;
M: callable >pprint-sequence simplify-callable ;