]> gitweb.factorcode.org Git - factor.git/commitdiff
help: use effect>string instead of present.
authorJohn Benediktsson <mrjbq7@gmail.com>
Mon, 19 May 2014 17:18:48 +0000 (10:18 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 19 May 2014 17:18:48 +0000 (10:18 -0700)
basis/help/lint/checks/checks.factor
basis/help/markup/markup.factor

index f5bae8911e3d5dbddb28049b5ce5a773a930584e..566dcb73596ef099b9803c91fdf78faeabcb51d7 100644 (file)
@@ -3,7 +3,7 @@
 USING: accessors arrays assocs classes classes.tuple combinators
 combinators.short-circuit debugger definitions effects eval
 formatting fry grouping help help.markup help.topics io
-io.streams.string kernel macros namespaces present sequences
+io.streams.string kernel macros namespaces sequences
 sequences.deep sets splitting strings summary unicode.categories
 vocabs vocabs.loader words words.constant words.symbol ;
 FROM: sets => members ;
@@ -37,18 +37,17 @@ SYMBOL: vocab-articles
     \ $example swap elements [ check-example ] each ;
 
 : extract-values ( element -- seq )
-    \ $values swap elements dup empty? [
-        first rest keys
-    ] unless ;
+    \ $values swap elements
+    [ f ] [ first rest keys ] if-empty ;
 
 : extract-value-effects ( element -- seq )
-    \ $values swap elements dup empty? [
+    \ $values swap elements [ f ] [
         first rest [
-            \ $quotation swap elements dup empty? [ drop f ] [
-                first second present
-            ] if
+            \ $quotation swap elements [ f ] [
+                first second dup effect? [ effect>string ] when
+            ] if-empty
         ] map
-    ] unless ;
+    ] if-empty ;
 
 : effect-values ( word -- seq )
     stack-effect
index 6c06f120b93289fd354caf72dab914f1b16e8a32..eba7bfed52ca341c465019eec5bf210c66d3e83e 100644 (file)
@@ -43,7 +43,7 @@ M: simple-element print-element [ print-element ] each ;
 M: string print-element [ write ] ($span) ;
 M: array print-element unclip execute( arg -- ) ;
 M: word print-element { } swap execute( arg -- ) ;
-M: effect print-element present print-element ;
+M: effect print-element effect>string print-element ;
 M: f print-element drop ;
 
 : print-element* ( element style -- )