refactor stack-checker slightly to fix circular dependency
parent
ff2a53e1b8
commit
4892bf1d47
|
@ -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 ;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue