From d5b33de57c94ae38cf752d72df38bf8012a04891 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Thu, 12 May 2016 16:33:19 -0700 Subject: [PATCH] typed: factor typed-def? out of typed-def. --- basis/typed/typed.factor | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/basis/typed/typed.factor b/basis/typed/typed.factor index 4a14e5d3b7..e8bdb46312 100644 --- a/basis/typed/typed.factor +++ b/basis/typed/typed.factor @@ -139,11 +139,15 @@ MACRO: typed ( quot word effect -- quot' ) [ drop [ swap "typed-word" set-word-prop ] [ [ 1quotation ] dip ] 2bi ] dip [ typed ] 3curry ; -: typed-def ( word def effect -- quot ) - dup { +: typed-def? ( effect -- quot ) + { [ effect-in-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 [ call-next-method ]