-USING: see tools.test io.streams.string math summary words ;
+USING: see tools.test io.streams.string math sequences summary
+words ;
IN: see.tests
CONSTANT: test-const 10
{ "IN: see.tests\nCONSTANT: test-const 10 inline\n" }
[ [ \ test-const see ] with-string-writer ] unit-test
+{ "IN: sequences\nERROR: non-negative-integer-expected n ;\n" }
+[ [ \ non-negative-integer-expected see ] with-string-writer ] unit-test
+
ALIAS: test-alias +
{ "USING: math ;\nIN: see.tests\nALIAS: test-alias + inline\n" }
[ \ test-alias summary ] unit-test
{ } [ gensym see ] unit-test
+
! Copyright (C) 2009, 2010 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays assocs classes classes.builtin
-classes.intersection classes.mixin classes.predicate classes.singleton
-classes.tuple classes.union combinators definitions effects generic
-generic.single generic.standard generic.hook io io.pathnames
+classes.error classes.intersection classes.mixin
+classes.predicate classes.singleton classes.tuple classes.union
+combinators definitions effects generic generic.hook
+generic.single generic.standard io io.pathnames
io.streams.string io.styles kernel make namespaces prettyprint
prettyprint.backend prettyprint.config prettyprint.custom
-prettyprint.sections sequences sets slots sorting strings summary
-words words.symbol words.constant words.alias vocabs ;
+prettyprint.sections sequences sets slots sorting strings
+summary vocabs words words.alias words.constant words.symbol ;
IN: see
GENERIC: synopsis* ( defspec -- )
[ drop ] [ call-next-method ] if
] tri ;
+M: error-class see-class*
+ <colon \ ERROR: pprint-word
+ {
+ [ pprint-word ]
+ [ superclass. ]
+ [ <block "slots" word-prop [ name>> pprint-slot-name ] each block> pprint-; ]
+ [ tuple-declarations. ]
+ } cleave
+ block> ;
+
+M: error-class see* see-class ;
+
: seeing-implementors ( class -- seq )
dup implementors
[ [ reader? ] [ writer? ] bi or ] reject