typed: factor typed-def? out of typed-def.
parent
3fa9ad91f6
commit
d5b33de57c
|
@ -139,11 +139,15 @@ MACRO: typed ( quot word effect -- quot' )
|
||||||
[ drop [ swap "typed-word" set-word-prop ] [ [ 1quotation ] dip ] 2bi ] dip
|
[ drop [ swap "typed-word" set-word-prop ] [ [ 1quotation ] dip ] 2bi ] dip
|
||||||
[ typed ] 3curry ;
|
[ typed ] 3curry ;
|
||||||
|
|
||||||
: typed-def ( word def effect -- quot )
|
: typed-def? ( effect -- quot )
|
||||||
dup {
|
{
|
||||||
[ effect-in-types typed-stack-effect? ]
|
[ effect-in-types typed-stack-effect? ]
|
||||||
[ effect-out-types typed-stack-effect? ]
|
[ effect-out-types typed-stack-effect? ]
|
||||||
} 1|| [ (typed-def) ] [ nip no-types-specified ] if ;
|
} 1|| ;
|
||||||
|
|
||||||
|
: typed-def ( word def effect -- quot )
|
||||||
|
dup typed-def?
|
||||||
|
[ (typed-def) ] [ nip no-types-specified ] if ;
|
||||||
|
|
||||||
M: typed-word subwords
|
M: typed-word subwords
|
||||||
[ call-next-method ]
|
[ call-next-method ]
|
||||||
|
|
Loading…
Reference in New Issue