]> gitweb.factorcode.org Git - factor.git/commitdiff
fix FUNCTION: prettyprint when function has no arguments
authorJoe Groff <arcata@gmail.com>
Wed, 16 Sep 2009 15:24:03 +0000 (10:24 -0500)
committerJoe Groff <arcata@gmail.com>
Wed, 16 Sep 2009 15:24:03 +0000 (10:24 -0500)
basis/alien/prettyprint/prettyprint.factor

index 096a5547c569ebaacd0bb3ee565cf5b4dbbf976b..4586c0854292f278a931bad17bbca53917e02346 100644 (file)
@@ -36,9 +36,11 @@ M: typedef-word synopsis*
     [ pprint-c-type ] [ text ] bi* ;
 
 : pprint-function-args ( word -- )
-    [ def>> fourth ] [ stack-effect in>> ] bi zip unclip-last
-    [ [ first2 "," append pprint-function-arg ] each ] dip
-    first2 pprint-function-arg ;
+    [ def>> fourth ] [ stack-effect in>> ] bi zip [ ] [
+        unclip-last
+        [ [ first2 "," append pprint-function-arg ] each ] dip
+        first2 pprint-function-arg
+    ] if-empty ;
 
 M: alien-function-word definer
     drop \ FUNCTION: \ ; ;