]> gitweb.factorcode.org Git - factor.git/blob - basis/typed/prettyprint/prettyprint.factor
Missed yet more renames
[factor.git] / basis / typed / prettyprint / prettyprint.factor
1 USING: definitions kernel locals.definitions see see.private typed words
2 summary make accessors classes ;
3 IN: typed.prettyprint
4
5 PREDICATE: typed-lambda-word < lambda-word "typed-word" word-prop ;
6
7 M: typed-word definer drop \ TYPED: \ ; ;
8 M: typed-lambda-word definer drop \ TYPED:: \ ; ;
9
10 M: typed-word definition "typed-def" word-prop ;
11 M: typed-word declarations. "typed-word" word-prop declarations. ;
12
13 M: input-mismatch-error summary
14     [
15         "Typed word “" %
16         dup word>> name>> %
17         "” expected input value of type " %
18         dup expected-type>> name>> %
19         " but got " %
20         dup value>> class-of name>> %
21         drop
22     ] "" make ;
23
24 M: output-mismatch-error summary
25     [
26         "Typed word “" %
27         dup word>> name>> %
28         "” expected to output value of type " %
29         dup expected-type>> name>> %
30         " but gave " %
31         dup value>> class-of name>> %
32         drop
33     ] "" make ;