refactor stack-checker slightly to fix circular dependency

db4
Joe Groff 2010-03-05 14:27:36 -08:00
parent ff2a53e1b8
commit 4892bf1d47
3 changed files with 6 additions and 3 deletions

View File

@ -157,3 +157,6 @@ M: bad-call summary
current-effect
stack-visitor get
] with-scope ; inline
: (infer) ( quot -- effect )
[ infer-quot-here ] with-infer drop ;

View File

@ -1,7 +1,7 @@
! (c)2010 Joe Groff bsd license
USING: accessors arrays assocs combinators combinators.short-circuit
continuations effects fry kernel locals math namespaces
quotations sequences splitting stack-checker
quotations sequences splitting
stack-checker.backend
stack-checker.errors
stack-checker.known-words
@ -68,7 +68,7 @@ GENERIC: (infer-known) ( known -- effect )
M: object (infer-known)
current-word get bad-macro-input ;
M: literal (infer-known)
value>> dup callable? [ infer ] [ abandon-check ] if ;
value>> dup callable? [ (infer) ] [ abandon-check ] if ;
M: composed (infer-known)
[ quot1>> known (infer-known) ] [ quot2>> known (infer-known) ] bi compose-effects ;
M: curried (infer-known)

View File

@ -11,7 +11,7 @@ IN: stack-checker
GENERIC: infer ( quot -- effect )
M: callable infer ( quot -- effect )
[ infer-quot-here ] with-infer drop ;
(infer) ;
: infer. ( quot -- )
#! Safe to call from inference transforms.