--- /dev/null
+USING: definitions kernel locals.definitions see see.private typed words ;
+IN: typed.prettyprint
+
+PREDICATE: typed-lambda-word < lambda-word "typed-word" word-prop ;
+
+M: typed-word definer drop \ TYPED: \ ; ;
+M: typed-lambda-word definer drop \ TYPED:: \ ; ;
+
+M: typed-word definition "typed-def" word-prop ;
+M: typed-word declarations. "typed-word" word-prop declarations. ;
+
USING: accessors arrays classes classes.tuple combinators
combinators.short-circuit definitions effects fry hints
math kernel kernel.private namespaces parser quotations
-see see.private sequences slots words locals locals.definitions
+sequences slots words locals
locals.parser macros stack-checker.state ;
IN: typed
ERROR: output-mismatch-error < type-mismatch-error ;
PREDICATE: typed-gensym < word "typed-gensym" word-prop ;
-PREDICATE: typed-standard-word < word "typed-word" word-prop ;
-PREDICATE: typed-lambda-word < lambda-word "typed-word" word-prop ;
+PREDICATE: typed-word < word "typed-word" word-prop ;
<PRIVATE
[ [ (typed) ] 3curry ]
[ 2nip ] 3tri define-declared ;
-UNION: typed-word typed-standard-word typed-lambda-word ;
-
MACRO: typed ( quot word effect -- quot' )
[ effect-in-types (depends-on) dup typed-stack-effect? [ typed-inputs ] [ 2drop ] if ]
[
[ effect-out-types typed-stack-effect? ]
} 1|| [ (typed-def) ] [ drop nip ] if ;
+M: typed-word subwords
+ [ call-next-method ]
+ [ "typed-word" word-prop ] bi suffix ;
+
PRIVATE>
: define-typed ( word def effect -- )
SYNTAX: TYPED::
(::) define-typed ;
-M: typed-standard-word definer drop \ TYPED: \ ; ;
-M: typed-lambda-word definer drop \ TYPED:: \ ; ;
-
-M: typed-word definition "typed-def" word-prop ;
-M: typed-word declarations. "typed-word" word-prop declarations. ;
-
-M: typed-word subwords
- [ call-next-method ]
- [ "typed-word" word-prop ] bi suffix ;
+USING: vocabs vocabs.loader ;
+"prettyprint" vocab [ "typed.prettyprint" require ] when