From 7d4bf03babab8b2fef49feae382ef59ea8a2f2ee Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Sun, 31 Mar 2013 17:12:35 -0700 Subject: [PATCH] see: fixing summary for ALIAS. --- basis/see/see-tests.factor | 8 ++++++-- basis/see/see.factor | 13 +++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/basis/see/see-tests.factor b/basis/see/see-tests.factor index ba81bf5e2f..0005fb08fd 100644 --- a/basis/see/see-tests.factor +++ b/basis/see/see-tests.factor @@ -1,7 +1,8 @@ +USING: see tools.test io.streams.string math summary words ; IN: see.tests -USING: see tools.test io.streams.string math words ; CONSTANT: test-const 10 + [ "IN: see.tests\nCONSTANT: test-const 10 inline\n" ] [ [ \ test-const see ] with-string-writer ] unit-test @@ -10,4 +11,7 @@ ALIAS: test-alias + [ "USING: math ;\nIN: see.tests\nALIAS: test-alias + inline\n" ] [ [ \ test-alias see ] with-string-writer ] unit-test -[ ] [ gensym see ] unit-test \ No newline at end of file +[ "IN: see.tests ALIAS: test-alias ( x y -- z )" ] +[ \ test-alias summary ] unit-test + +[ ] [ gensym see ] unit-test diff --git a/basis/see/see.factor b/basis/see/see.factor index 7450d827fe..712b55f142 100644 --- a/basis/see/see.factor +++ b/basis/see/see.factor @@ -91,6 +91,19 @@ M: mixin-instance synopsis* M: pathname synopsis* pprint* ; +M: alias summary + [ + 0 margin set 1 line-limit set + [ + { + [ seeing-word ] + [ definer. ] + [ pprint-word ] + [ stack-effect pprint-effect ] + } cleave + ] with-in + ] with-string-writer ; + M: word summary synopsis ; GENERIC: declarations. ( obj -- )