use `check-instance` instead; reformat USING:`
authorAlex Maestas <git@se30.xyz>
Wed, 10 Aug 2022 20:09:50 +0000 (20:09 +0000)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 10 Aug 2022 21:28:57 +0000 (14:28 -0700)
basis/stack-checker/stack-checker.factor

index 09cdc08b256b8ada7355705a70226a3f83b9dca8..4eab65f26f9a3fc5557bbc4b13813b1eca171715 100644 (file)
@@ -1,17 +1,15 @@
 ! Copyright (C) 2004, 2010 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors kernel io effects namespaces sequences
-quotations vocabs vocabs.loader generic words
-stack-checker.backend stack-checker.state
-stack-checker.known-words stack-checker.transforms
-stack-checker.errors stack-checker.inlining
-stack-checker.visitor.dummy ;
+USING: accessors classes effects generic io kernel namespaces
+quotations sequences stack-checker.backend stack-checker.errors
+stack-checker.inlining stack-checker.known-words
+stack-checker.state stack-checker.transforms
+stack-checker.visitor.dummy vocabs vocabs.loader words ;
 IN: stack-checker
 
 : infer ( quot -- effect )
-    dup callable?
-    [ [ infer-quot-here ] with-infer drop ]
-    [ drop ( -- x ) ] if ;
+    callable check-instance
+    [ infer-quot-here ] with-infer drop ;
 
 : infer. ( quot -- )
     ! Safe to call from inference transforms.