From: John Benediktsson Date: Fri, 19 Mar 2021 17:09:48 +0000 (-0700) Subject: tools.scaffold: choose a vocab-root for scaffold-vocab with a restart. X-Git-Tag: 0.99~2430 X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=e15505bc8fb9ba7f93d6160b23ed5d5dbb99e437 tools.scaffold: choose a vocab-root for scaffold-vocab with a restart. For now, don't guess the right vocab-root to put it in since that is a little bit off for math.foobar and other core vocabs. --- diff --git a/basis/tools/scaffold/scaffold.factor b/basis/tools/scaffold/scaffold.factor index 8231773124..0629be1b50 100644 --- a/basis/tools/scaffold/scaffold.factor +++ b/basis/tools/scaffold/scaffold.factor @@ -3,12 +3,12 @@ USING: accessors alien arrays assocs byte-arrays calendar classes classes.error combinators combinators.short-circuit -hashtables help.markup interpolate io io.directories -io.encodings.utf8 io.files io.pathnames io.streams.string kernel -math math.parser math.ranges namespaces prettyprint quotations -sequences sets sorting splitting strings system timers unicode -urls vocabs vocabs.loader vocabs.loader.private vocabs.metadata -words words.symbol ; +continuations hashtables help.markup interpolate io +io.directories io.encodings.utf8 io.files io.pathnames +io.streams.string kernel math math.parser namespaces prettyprint +quotations sequences sets sorting splitting strings system +timers unicode urls vocabs vocabs.loader vocabs.metadata words +words.symbol ; IN: tools.scaffold SYMBOL: developer-name @@ -310,18 +310,10 @@ PRIVATE> : scaffold-work ( string -- ) "resource:work" swap scaffold-vocab-in ; - - : scaffold-vocab ( string -- ) - [ find-vocab-root-for ] [ scaffold-vocab-in ] bi ; + "Choose a vocabulary root:" vocab-roots get + '[ [ "Use " prepend ] keep ] { } map>assoc throw-restarts + swap scaffold-vocab-in ;