From fe59b4d24d515b5106d03759515061ff4be6448f Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Mon, 9 Feb 2009 01:47:31 -0600 Subject: [PATCH] help: make all relevant words infer --- basis/help/help.factor | 6 +++--- basis/help/markup/markup-tests.factor | 3 +++ basis/help/markup/markup.factor | 6 +++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/basis/help/help.factor b/basis/help/help.factor index 0d13f3aeb0..eb533af399 100644 --- a/basis/help/help.factor +++ b/basis/help/help.factor @@ -1,11 +1,11 @@ -! Copyright (C) 2005, 2008 Slava Pestov. +! Copyright (C) 2005, 2009 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: accessors arrays io io.styles kernel namespaces make parser prettyprint sequences words words.symbol assocs definitions generic quotations effects slots continuations classes.tuple debugger combinators vocabs help.stylesheet help.topics help.crossref help.markup sorting classes -vocabs.loader ; +vocabs.loader call ; IN: help GENERIC: word-help* ( word -- content ) @@ -125,7 +125,7 @@ SYMBOL: help-hook help-hook global [ [ print-topic ] or ] change-at : help ( topic -- ) - help-hook get call ; + help-hook get call( topic -- ) ; : about ( vocab -- ) dup require diff --git a/basis/help/markup/markup-tests.factor b/basis/help/markup/markup-tests.factor index 0d8aa53d44..74bc45d36c 100644 --- a/basis/help/markup/markup-tests.factor +++ b/basis/help/markup/markup-tests.factor @@ -25,3 +25,6 @@ TUPLE: blahblah quux ; [ "a string, a fixnum, or an integer" ] [ [ { $or string fixnum integer } print-element ] with-string-writer ] unit-test + +\ print-element must-infer +\ print-topic must-infer \ No newline at end of file diff --git a/basis/help/markup/markup.factor b/basis/help/markup/markup.factor index 1818dae210..ac4533324c 100644 --- a/basis/help/markup/markup.factor +++ b/basis/help/markup/markup.factor @@ -4,7 +4,7 @@ USING: accessors arrays definitions generic io kernel assocs hashtables namespaces make parser prettyprint sequences strings io.styles vectors words math sorting splitting classes slots fry sets vocabs help.stylesheet help.topics vocabs.loader quotations -combinators ; +combinators call ; IN: help.markup PREDICATE: simple-element < array @@ -27,8 +27,8 @@ GENERIC: print-element ( element -- ) M: simple-element print-element [ print-element ] each ; M: string print-element [ write ] ($span) ; -M: array print-element unclip execute ; -M: word print-element { } swap execute ; +M: array print-element unclip execute( arg -- ) ; +M: word print-element { } swap execute( arg -- ) ; M: f print-element drop ; : print-element* ( element style -- )