diff --git a/basis/prettyprint/backend/backend.factor b/basis/prettyprint/backend/backend.factor index a3e5ba810f..103a5a72ec 100644 --- a/basis/prettyprint/backend/backend.factor +++ b/basis/prettyprint/backend/backend.factor @@ -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 ; diff --git a/basis/prettyprint/backend/callables/authors.txt b/extra/prettyprint/callables/authors.txt similarity index 100% rename from basis/prettyprint/backend/callables/authors.txt rename to extra/prettyprint/callables/authors.txt diff --git a/basis/prettyprint/backend/callables/callables-docs.factor b/extra/prettyprint/callables/callables-docs.factor similarity index 81% rename from basis/prettyprint/backend/callables/callables-docs.factor rename to extra/prettyprint/callables/callables-docs.factor index 968fdbcb3d..9865f0eaee 100644 --- a/basis/prettyprint/backend/callables/callables-docs.factor +++ b/extra/prettyprint/callables/callables-docs.factor @@ -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 } } diff --git a/basis/prettyprint/backend/callables/callables-tests.factor b/extra/prettyprint/callables/callables-tests.factor similarity index 87% rename from basis/prettyprint/backend/callables/callables-tests.factor rename to extra/prettyprint/callables/callables-tests.factor index de5b8a073a..9d9abb3305 100644 --- a/basis/prettyprint/backend/callables/callables-tests.factor +++ b/extra/prettyprint/callables/callables-tests.factor @@ -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 diff --git a/basis/prettyprint/backend/callables/callables.factor b/extra/prettyprint/callables/callables.factor similarity index 93% rename from basis/prettyprint/backend/callables/callables.factor rename to extra/prettyprint/callables/callables.factor index 19350b6b51..195a6ce48b 100644 --- a/basis/prettyprint/backend/callables/callables.factor +++ b/extra/prettyprint/callables/callables.factor @@ -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 : simplify-callable ( quot -- quot' ) [ (simplify-callable) ] to-fixed-point ; + +M: callable >pprint-sequence simplify-callable ; diff --git a/basis/prettyprint/backend/callables/summary.txt b/extra/prettyprint/callables/summary.txt similarity index 100% rename from basis/prettyprint/backend/callables/summary.txt rename to extra/prettyprint/callables/summary.txt