]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/logging/analysis/analysis.factor
Fixing everything for mandatory stack effects
[factor.git] / extra / logging / analysis / analysis.factor
index cd1429ac53485d9f332c6c2cc0e626026eac1c5c..a074ccd1b9072ebbb44f44b4283faf9b7d2f439f 100755 (executable)
@@ -1,7 +1,8 @@
 ! Copyright (C) 2008 Slava Pestov.\r
 ! See http://factorcode.org/license.txt for BSD license.\r
 USING: kernel sequences namespaces words assocs logging sorting\r
-prettyprint io io.styles strings logging.parser calendar.format ;\r
+prettyprint io io.styles strings logging.parser calendar.format\r
+combinators ;\r
 IN: logging.analysis\r
 \r
 SYMBOL: word-names\r
@@ -41,12 +42,14 @@ SYMBOL: message-histogram
         ] curry assoc-each\r
     ] tabular-output ;\r
 \r
-: log-entry.\r
+: log-entry. ( entry -- )\r
     "====== " write\r
-    dup first (timestamp>string) bl\r
-    dup second pprint bl\r
-    dup third write nl\r
-    fourth "\n" join print ;\r
+    {\r
+        [ first (timestamp>string) bl ]\r
+        [ second pprint bl ]\r
+        [ third write nl ]\r
+        [ fourth "\n" join print ]\r
+    } cleave ;\r
 \r
 : errors. ( errors -- )\r
     [ log-entry. ] each ;\r