1 ! Copyright (C) 2004, 2010 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors kernel io effects namespaces sequences
4 quotations vocabs vocabs.loader generic words
5 stack-checker.backend stack-checker.state
6 stack-checker.known-words stack-checker.transforms
7 stack-checker.errors stack-checker.inlining
8 stack-checker.visitor.dummy ;
11 : infer ( quot -- effect )
13 [ [ infer-quot-here ] with-infer drop ]
14 [ drop ( -- x ) ] if ;
17 ! Safe to call from inference transforms.
18 infer effect>string print ;
20 M: callable stack-effect infer ;