From 99ed27a8332e406d62d0546a845eb1afe4d3b2a3 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Fri, 3 Jun 2016 11:34:15 -0700 Subject: [PATCH] core: using lowercase colon words. --- core/alien/accessors/accessors.factor | 2 +- core/alien/alien-docs.factor | 2 +- core/alien/alien-tests.factor | 6 +++--- core/alien/alien.factor | 4 ++-- core/alien/c-types/c-types-docs.factor | 2 +- core/alien/c-types/c-types-tests.factor | 18 +++++++++--------- core/alien/c-types/c-types.factor | 4 ++-- core/alien/libraries/libraries-docs.factor | 2 +- core/alien/libraries/libraries.factor | 6 +++--- core/alien/strings/strings-docs.factor | 2 +- core/alien/strings/strings-tests.factor | 2 +- core/alien/strings/strings.factor | 2 +- core/arrays/arrays-docs.factor | 2 +- core/arrays/arrays.factor | 2 +- core/assocs/assocs-docs.factor | 2 +- core/assocs/assocs-tests.factor | 4 ++-- core/assocs/assocs.factor | 2 +- core/bootstrap/primitives-docs.factor | 2 +- core/bootstrap/primitives.factor | 2 +- core/bootstrap/stage1.factor | 2 +- core/bootstrap/syntax.factor | 2 +- core/byte-arrays/byte-arrays-docs.factor | 2 +- core/byte-arrays/byte-arrays.factor | 2 +- core/byte-vectors/byte-vectors-docs.factor | 2 +- core/byte-vectors/byte-vectors-tests.factor | 2 +- core/byte-vectors/byte-vectors.factor | 2 +- core/checksums/checksums-docs.factor | 2 +- core/checksums/checksums.factor | 2 +- core/checksums/crc32/crc32-docs.factor | 2 +- core/checksums/crc32/crc32.factor | 4 ++-- core/classes/algebra/algebra-docs.factor | 2 +- core/classes/algebra/algebra-tests.factor | 10 +++++----- core/classes/algebra/algebra.factor | 4 ++-- core/classes/builtin/builtin-docs.factor | 2 +- core/classes/builtin/builtin-tests.factor | 2 +- core/classes/builtin/builtin.factor | 4 ++-- core/classes/classes-docs.factor | 2 +- core/classes/classes-tests.factor | 4 ++-- core/classes/classes.factor | 18 +++++++++--------- core/classes/error/error-tests.factor | 2 +- core/classes/error/error.factor | 2 +- .../intersection/intersection-docs.factor | 2 +- .../intersection/intersection-tests.factor | 2 +- core/classes/intersection/intersection.factor | 2 +- core/classes/maybe/maybe-tests.factor | 2 +- core/classes/maybe/maybe.factor | 2 +- core/classes/mixin/mixin-docs.factor | 2 +- core/classes/mixin/mixin-tests.factor | 8 ++++---- core/classes/mixin/mixin.factor | 2 +- core/classes/parser/parser.factor | 2 +- core/classes/predicate/predicate-docs.factor | 2 +- core/classes/predicate/predicate-tests.factor | 2 +- core/classes/predicate/predicate.factor | 2 +- core/classes/singleton/singleton-docs.factor | 2 +- core/classes/singleton/singleton-tests.factor | 4 ++-- core/classes/singleton/singleton.factor | 2 +- core/classes/tuple/parser/parser-docs.factor | 2 +- core/classes/tuple/parser/parser-tests.factor | 2 +- core/classes/tuple/parser/parser.factor | 2 +- core/classes/tuple/tuple-docs.factor | 2 +- core/classes/tuple/tuple-tests.factor | 4 ++-- core/classes/tuple/tuple.factor | 4 ++-- core/classes/union/union-docs.factor | 2 +- core/classes/union/union-tests.factor | 4 ++-- core/classes/union/union.factor | 2 +- core/combinators/combinators-docs.factor | 2 +- core/combinators/combinators-tests.factor | 2 +- core/combinators/combinators.factor | 2 +- .../short-circuit/short-circuit-docs.factor | 2 +- .../short-circuit/short-circuit-tests.factor | 2 +- .../short-circuit/short-circuit.factor | 2 +- .../short-circuit/smart/smart-docs.factor | 2 +- .../short-circuit/smart/smart.factor | 2 +- core/command-line/command-line-docs.factor | 2 +- core/command-line/command-line.factor | 14 +++++++------- core/command-line/debugger/debugger.factor | 2 +- core/command-line/startup/startup.factor | 2 +- core/compiler/errors/errors-docs.factor | 2 +- core/compiler/errors/errors.factor | 10 +++++----- core/compiler/units/units-docs.factor | 2 +- core/compiler/units/units-tests.factor | 6 +++--- core/compiler/units/units.factor | 10 +++++----- core/continuations/continuations-docs.factor | 2 +- core/continuations/continuations-tests.factor | 6 +++--- core/continuations/continuations.factor | 18 +++++++++--------- core/cpu/architecture/architecture-docs.factor | 2 +- .../cpu/architecture/architecture-tests.factor | 2 +- core/cpu/architecture/architecture.factor | 4 ++-- core/definitions/definitions-docs.factor | 2 +- core/definitions/definitions-tests.factor | 8 ++++---- core/definitions/definitions.factor | 14 +++++++------- core/delegate/delegate-docs.factor | 2 +- core/delegate/delegate-tests.factor | 2 +- core/delegate/delegate.factor | 2 +- core/delegate/protocols/protocols.factor | 2 +- core/destructors/destructors-docs.factor | 2 +- core/destructors/destructors-tests.factor | 2 +- core/destructors/destructors.factor | 10 +++++----- core/effects/effects-docs.factor | 2 +- core/effects/effects-tests.factor | 2 +- core/effects/effects.factor | 2 +- core/effects/parser/parser-docs.factor | 2 +- core/effects/parser/parser.factor | 4 ++-- core/fry/fry-docs.factor | 2 +- core/fry/fry-tests.factor | 2 +- core/fry/fry.factor | 2 +- .../generalizations-docs.factor | 2 +- .../generalizations-tests.factor | 2 +- core/generalizations/generalizations.factor | 4 ++-- core/generic/generic-docs.factor | 2 +- core/generic/generic.factor | 2 +- core/generic/hook/hook-docs.factor | 2 +- core/generic/hook/hook-tests.factor | 4 ++-- core/generic/hook/hook.factor | 2 +- core/generic/math/math-docs.factor | 2 +- core/generic/math/math.factor | 6 +++--- core/generic/parser/parser-docs.factor | 2 +- core/generic/parser/parser.factor | 4 ++-- core/generic/single/single-docs.factor | 2 +- core/generic/single/single.factor | 12 ++++++------ core/generic/standard/standard-docs.factor | 2 +- core/generic/standard/standard-tests.factor | 2 +- core/generic/standard/standard.factor | 2 +- core/graphs/graphs-docs.factor | 2 +- core/graphs/graphs.factor | 2 +- core/grouping/grouping-docs.factor | 2 +- core/grouping/grouping-tests.factor | 2 +- core/grouping/grouping.factor | 2 +- core/growable/growable-docs.factor | 2 +- core/growable/growable-tests.factor | 2 +- core/growable/growable.factor | 2 +- core/hash-sets/hash-sets-docs.factor | 2 +- core/hash-sets/hash-sets.factor | 2 +- core/hashtables/hashtables-docs.factor | 2 +- core/hashtables/hashtables.factor | 2 +- core/hashtables/identity/identity-tests.factor | 2 +- core/hashtables/identity/identity.factor | 2 +- core/hashtables/wrapped/wrapped.factor | 2 +- core/hints/hints-docs.factor | 2 +- core/hints/hints-tests.factor | 2 +- core/hints/hints.factor | 2 +- core/init/init-docs.factor | 2 +- core/init/init.factor | 6 +++--- core/io/backend/backend-tests.factor | 2 +- core/io/backend/backend.factor | 6 +++--- core/io/binary/binary-docs.factor | 2 +- core/io/binary/binary-tests.factor | 2 +- core/io/binary/binary.factor | 2 +- core/io/encodings/ascii/ascii-docs.factor | 2 +- core/io/encodings/ascii/ascii.factor | 4 ++-- core/io/encodings/encodings-docs.factor | 2 +- core/io/encodings/encodings-tests.factor | 2 +- core/io/encodings/encodings.factor | 2 +- core/io/encodings/utf16/utf16-docs.factor | 2 +- core/io/encodings/utf16/utf16.factor | 8 ++++---- core/io/encodings/utf16n/utf16n-docs.factor | 2 +- core/io/encodings/utf16n/utf16n-tests.factor | 2 +- core/io/encodings/utf16n/utf16n.factor | 4 ++-- core/io/encodings/utf8/utf8-docs.factor | 2 +- core/io/encodings/utf8/utf8-tests.factor | 2 +- core/io/encodings/utf8/utf8.factor | 4 ++-- core/io/files/files-docs.factor | 2 +- core/io/files/files-tests.factor | 2 +- core/io/files/files.factor | 8 ++++---- core/io/io-docs.factor | 2 +- core/io/io-tests.factor | 2 +- core/io/io.factor | 4 ++-- core/io/pathnames/pathnames-docs.factor | 2 +- core/io/pathnames/pathnames.factor | 4 ++-- .../streams/byte-array/byte-array-docs.factor | 2 +- .../streams/byte-array/byte-array-tests.factor | 2 +- core/io/streams/byte-array/byte-array.factor | 2 +- core/io/streams/c/c-docs.factor | 2 +- core/io/streams/c/c.factor | 2 +- core/io/streams/memory/memory-tests.factor | 2 +- core/io/streams/memory/memory.factor | 2 +- core/io/streams/plain/plain-docs.factor | 2 +- core/io/streams/plain/plain.factor | 2 +- core/io/streams/sequence/sequence.factor | 2 +- core/io/streams/string/string-docs.factor | 2 +- core/io/streams/string/string-tests.factor | 2 +- core/io/streams/string/string.factor | 2 +- core/io/test/no-trailing-eol.factor | 6 +++--- core/kernel/kernel-docs.factor | 2 +- core/kernel/kernel-tests.factor | 2 +- core/kernel/kernel.factor | 2 +- core/layouts/layouts-docs.factor | 2 +- core/layouts/layouts.factor | 16 ++++++++-------- core/lexer/lexer-docs.factor | 2 +- core/lexer/lexer.factor | 2 +- core/locals/backend/backend-tests.factor | 2 +- core/locals/backend/backend.factor | 2 +- core/locals/definitions/definitions.factor | 2 +- core/locals/errors/errors.factor | 2 +- core/locals/fry/fry.factor | 2 +- core/locals/locals-docs.factor | 12 ++++++------ core/locals/locals-tests.factor | 2 +- core/locals/locals.factor | 2 +- core/locals/macros/macros.factor | 2 +- core/locals/parser/parser-docs.factor | 2 +- core/locals/parser/parser-tests.factor | 2 +- core/locals/parser/parser.factor | 6 +++--- core/locals/rewrite/closures/closures.factor | 2 +- .../rewrite/point-free/point-free.factor | 2 +- core/locals/rewrite/sugar/sugar.factor | 2 +- core/locals/types/types-tests.factor | 2 +- core/locals/types/types.factor | 2 +- core/macros/expander/expander-tests.factor | 2 +- core/macros/expander/expander.factor | 4 ++-- core/macros/macros-docs.factor | 2 +- core/macros/macros-tests.factor | 2 +- core/macros/macros.factor | 2 +- core/make/make-docs.factor | 2 +- core/make/make.factor | 4 ++-- core/math/floats/floats-docs.factor | 2 +- core/math/floats/floats.factor | 2 +- core/math/integers/integers-docs.factor | 2 +- core/math/integers/integers-tests.factor | 2 +- core/math/integers/integers.factor | 2 +- core/math/math-docs.factor | 2 +- core/math/math-tests.factor | 2 +- core/math/math.factor | 2 +- core/math/order/order-docs.factor | 2 +- core/math/order/order.factor | 8 ++++---- core/math/parser/parser-docs.factor | 2 +- core/math/parser/parser.factor | 2 +- core/math/ranges/ranges-docs.factor | 2 +- core/math/ranges/ranges-tests.factor | 2 +- core/math/ranges/ranges.factor | 2 +- core/math/ratios/ratios-docs.factor | 2 +- core/math/ratios/ratios.factor | 2 +- core/memoize/memoize-docs.factor | 2 +- core/memoize/memoize-tests.factor | 2 +- core/memoize/memoize.factor | 2 +- core/memory/memory-docs.factor | 2 +- core/memory/memory-tests.factor | 6 +++--- core/memory/memory.factor | 2 +- core/modern/compiler/compiler.factor | 2 +- core/modern/modern-tests.factor | 4 ++-- core/modern/modern.factor | 4 ++-- core/modern/out/out-tests.factor | 2 +- core/modern/out/out.factor | 6 +++--- core/modern/paths/paths.factor | 2 +- core/modern/slices/slices.factor | 2 +- core/namespaces/namespaces-docs.factor | 2 +- core/namespaces/namespaces-tests.factor | 6 +++--- core/namespaces/namespaces.factor | 2 +- core/parser/notes/notes-docs.factor | 2 +- core/parser/notes/notes-tests.factor | 2 +- core/parser/notes/notes.factor | 4 ++-- core/parser/parser-docs.factor | 2 +- core/parser/parser-tests.factor | 8 ++++---- core/parser/parser.factor | 10 +++++----- core/quotations/quotations-docs.factor | 2 +- core/quotations/quotations.factor | 2 +- core/sbufs/sbufs-docs.factor | 2 +- core/sbufs/sbufs.factor | 2 +- .../generalizations-docs.factor | 2 +- .../generalizations-tests.factor | 2 +- .../generalizations/generalizations.factor | 2 +- core/sequences/sequences-docs.factor | 2 +- core/sequences/sequences-tests.factor | 2 +- core/sequences/sequences.factor | 4 ++-- core/sets/sets-docs.factor | 2 +- core/sets/sets-tests.factor | 2 +- core/sets/sets.factor | 2 +- core/slots/slots-docs.factor | 2 +- core/slots/slots-tests.factor | 2 +- core/slots/slots.factor | 2 +- core/sorting/sorting-docs.factor | 2 +- core/sorting/sorting.factor | 2 +- core/source-files/errors/errors-docs.factor | 2 +- core/source-files/errors/errors-tests.factor | 2 +- core/source-files/errors/errors.factor | 6 +++--- core/source-files/source-files-docs.factor | 2 +- core/source-files/source-files.factor | 6 +++--- core/splitting/splitting-docs.factor | 2 +- core/splitting/splitting.factor | 2 +- core/stack-checker/alien/alien-docs.factor | 2 +- core/stack-checker/alien/alien.factor | 4 ++-- core/stack-checker/backend/backend-docs.factor | 2 +- .../stack-checker/backend/backend-tests.factor | 2 +- core/stack-checker/backend/backend.factor | 2 +- .../branches/branches-docs.factor | 2 +- core/stack-checker/branches/branches.factor | 2 +- .../dependencies/dependencies.factor | 8 ++++---- core/stack-checker/errors/errors-docs.factor | 2 +- core/stack-checker/errors/errors.factor | 2 +- .../inlining/inlining-docs.factor | 2 +- core/stack-checker/inlining/inlining.factor | 6 +++--- .../known-words/known-words-docs.factor | 2 +- .../known-words/known-words-tests.factor | 2 +- .../known-words/known-words.factor | 2 +- .../recursive-state-docs.factor | 2 +- .../recursive-state/recursive-state.factor | 2 +- .../recursive-state/tree/tree.factor | 2 +- .../row-polymorphism/row-polymorphism.factor | 2 +- core/stack-checker/stack-checker-docs.factor | 2 +- core/stack-checker/stack-checker-tests.factor | 6 +++--- core/stack-checker/stack-checker.factor | 2 +- core/stack-checker/state/state-docs.factor | 2 +- core/stack-checker/state/state-tests.factor | 2 +- core/stack-checker/state/state.factor | 14 +++++++------- .../transforms/transforms-docs.factor | 2 +- .../transforms/transforms-tests.factor | 2 +- .../stack-checker/transforms/transforms.factor | 2 +- core/stack-checker/values/values-docs.factor | 2 +- core/stack-checker/values/values-tests.factor | 2 +- core/stack-checker/values/values.factor | 8 ++++---- core/stack-checker/visitor/dummy/dummy.factor | 2 +- core/stack-checker/visitor/visitor-docs.factor | 2 +- core/stack-checker/visitor/visitor.factor | 4 ++-- core/strings/parser/parser-docs.factor | 2 +- core/strings/parser/parser.factor | 4 ++-- core/strings/strings-docs.factor | 2 +- core/strings/strings.factor | 2 +- core/summary/summary-docs.factor | 2 +- core/summary/summary-tests.factor | 2 +- core/summary/summary.factor | 2 +- core/syntax/syntax-docs.factor | 2 +- core/syntax/syntax.factor | 2 +- core/system/system-docs.factor | 2 +- core/system/system.factor | 2 +- core/typed/namespaces/namespaces-tests.factor | 4 ++-- core/typed/namespaces/namespaces.factor | 2 +- core/typed/typed-docs.factor | 6 +++--- core/typed/typed-tests.factor | 10 +++++----- core/typed/typed.factor | 2 +- core/vectors/vectors-docs.factor | 2 +- core/vectors/vectors.factor | 2 +- core/vocabs/loader/loader-docs.factor | 2 +- core/vocabs/loader/loader-tests.factor | 6 +++--- core/vocabs/loader/loader.factor | 18 +++++++++--------- core/vocabs/loader/test/a/a.factor | 2 +- core/vocabs/loader/test/b/b.factor | 2 +- core/vocabs/loader/test/c/c.factor | 2 +- core/vocabs/loader/test/d/d.factor | 2 +- core/vocabs/loader/test/f/f.factor | 4 ++-- core/vocabs/loader/test/g/g.factor | 2 +- core/vocabs/loader/test/h/h.factor | 2 +- core/vocabs/loader/test/i/i.factor | 4 ++-- core/vocabs/loader/test/j/j.factor | 2 +- core/vocabs/loader/test/k/k.factor | 4 ++-- core/vocabs/loader/test/l/l.factor | 4 ++-- core/vocabs/loader/test/m/m.factor | 4 ++-- core/vocabs/loader/test/n/n.factor | 2 +- core/vocabs/loader/test/o/o.factor | 2 +- core/vocabs/loader/test/p/p.factor | 2 +- core/vocabs/parser/parser-docs.factor | 2 +- core/vocabs/parser/parser-tests.factor | 2 +- core/vocabs/parser/parser.factor | 2 +- core/vocabs/vocabs-docs.factor | 2 +- core/vocabs/vocabs.factor | 14 +++++++------- core/words/alias/alias-docs.factor | 2 +- core/words/alias/alias-tests.factor | 2 +- core/words/alias/alias.factor | 2 +- core/words/constant/constant-docs.factor | 2 +- core/words/constant/constant-tests.factor | 4 ++-- core/words/constant/constant.factor | 2 +- core/words/symbol/symbol-docs.factor | 2 +- core/words/symbol/symbol.factor | 2 +- core/words/words-docs.factor | 2 +- core/words/words-tests.factor | 4 ++-- core/words/words.factor | 4 ++-- 364 files changed, 560 insertions(+), 560 deletions(-) diff --git a/core/alien/accessors/accessors.factor b/core/alien/accessors/accessors.factor index c439b1dfce..1aecf18d4a 100644 --- a/core/alien/accessors/accessors.factor +++ b/core/alien/accessors/accessors.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2015 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. -IN: alien.accessors +in: alien.accessors PRIMITIVE: alien-cell ( c-ptr n -- value ) PRIMITIVE: alien-double ( c-ptr n -- value ) diff --git a/core/alien/alien-docs.factor b/core/alien/alien-docs.factor index d7040710bb..90dc270e19 100644 --- a/core/alien/alien-docs.factor +++ b/core/alien/alien-docs.factor @@ -2,7 +2,7 @@ USING: alien.accessors alien.c-types alien.libraries alien.strings alien.syntax byte-arrays cpu.x86 eval help.markup help.syntax io io.backend io.encodings.utf16n io.encodings.utf8 kernel math quotations sequences system ; -IN: alien +in: alien HELP: callee-cleanup? { $values { "abi" abi } { "?" boolean } } diff --git a/core/alien/alien-tests.factor b/core/alien/alien-tests.factor index 28b2fe6d77..55ea180be9 100644 --- a/core/alien/alien-tests.factor +++ b/core/alien/alien-tests.factor @@ -2,7 +2,7 @@ USING: accessors alien alien.accessors alien.c-types alien.syntax byte-arrays continuations fry kernel layouts math namespaces prettyprint sequences tools.memory tools.test ; QUALIFIED: sets -IN: alien.tests +in: alien.tests { t } [ -1 alien-address 0 > ] unit-test @@ -72,7 +72,7 @@ cell 8 = [ { "( displaced alien )" } [ 1 B{ 1 2 3 } unparse ] unit-test -SYMBOL: initialize-test +symbol: initialize-test f initialize-test set-global @@ -91,7 +91,7 @@ f initialize-test set-global : produce-until-error ( quot -- error seq ) '[ [ @ t ] [ f ] recover ] [ ] produce ; inline -SYMBOL: foo +symbol: foo : fill-and-free-callback-heap ( -- ) [ \ foo 33 ] produce-until-error nip [ free-callback ] each ; diff --git a/core/alien/alien.factor b/core/alien/alien.factor index b60331d8cb..8159a8355a 100755 --- a/core/alien/alien.factor +++ b/core/alien/alien.factor @@ -3,7 +3,7 @@ USING: accessors assocs byte-arrays byte-vectors continuations continuations.private init kernel kernel.private math namespaces sequences ; -IN: alien +in: alien BUILTIN: alien { underlying c-ptr read-only initial: f } expired ; BUILTIN: dll { path byte-array read-only initial: B{ } } ; @@ -109,7 +109,7 @@ ERROR: alien-assembly-error code ; ! are also pinned in a special callback area, so clearing this ! hashtable will not reclaim callbacks. It should only be ! cleared on startup. -SYMBOL: callbacks +symbol: callbacks [ H{ } clone callbacks set-global ] "alien" add-startup-hook diff --git a/core/alien/c-types/c-types-docs.factor b/core/alien/c-types/c-types-docs.factor index bf35d968af..ecb222d56f 100644 --- a/core/alien/c-types/c-types-docs.factor +++ b/core/alien/c-types/c-types-docs.factor @@ -2,7 +2,7 @@ USING: alien help.syntax help.markup libc kernel.private byte-arrays strings hashtables alien.syntax alien.strings sequences io.encodings.string debugger destructors vocabs.loader classes.struct math kernel ; -IN: alien.c-types +in: alien.c-types HELP: heap-size { $values { "name" c-type-name } { "size" math:integer } } diff --git a/core/alien/c-types/c-types-tests.factor b/core/alien/c-types/c-types-tests.factor index 04a18dbb70..50b6abeba2 100644 --- a/core/alien/c-types/c-types-tests.factor +++ b/core/alien/c-types/c-types-tests.factor @@ -2,7 +2,7 @@ USING: accessors alien.c-types alien.syntax classes classes.struct compiler.units eval io.encodings.ascii kernel math.constants tools.test ; FROM: alien.c-types => short ; -IN: alien.c-types.tests +in: alien.c-types.tests CONSTANT: xyz 123 @@ -126,26 +126,26 @@ must-fail-with ! generic -> callback "IN: alien.c-types.tests -USE: alien.syntax -USE: alien.c-types +use: alien.syntax +use: alien.c-types GENERIC: foo-func ( x -- ) " eval( -- ) "IN: alien.c-types.tests -USE: alien.syntax -USE: alien.c-types +use: alien.syntax +use: alien.c-types CALLBACK: void foo-func ( ) " eval( -- ) ! generic -> typedef "IN: alien.c-types.tests -USE: alien.syntax -USE: alien.c-types +use: alien.syntax +use: alien.c-types GENERIC: foo-func ( x -- ) " eval( -- ) "IN: alien.c-types.tests -USE: alien.syntax -USE: alien.c-types +use: alien.syntax +use: alien.c-types TYPEDEF: void* foo-func " eval( -- ) diff --git a/core/alien/c-types/c-types.factor b/core/alien/c-types/c-types.factor index ba7fc0e029..f7d8ce8efd 100644 --- a/core/alien/c-types/c-types.factor +++ b/core/alien/c-types/c-types.factor @@ -4,7 +4,7 @@ USING: accessors alien alien.accessors arrays byte-arrays classes combinators compiler.units cpu.architecture delegate fry kernel layouts locals macros math math.order quotations sequences system words words.symbol summary ; -IN: alien.c-types +in: alien.c-types SYMBOLS: char uchar @@ -15,7 +15,7 @@ SYMBOLS: float double void* bool ; -SINGLETON: void +singleton: void TUPLE: abstract-c-type { class class initial: object } diff --git a/core/alien/libraries/libraries-docs.factor b/core/alien/libraries/libraries-docs.factor index c824f8ca4d..a151f7390c 100644 --- a/core/alien/libraries/libraries-docs.factor +++ b/core/alien/libraries/libraries-docs.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors alien alien.syntax assocs help.markup help.syntax io.backend kernel namespaces strings ; -IN: alien.libraries +in: alien.libraries HELP: make-library { $values diff --git a/core/alien/libraries/libraries.factor b/core/alien/libraries/libraries.factor index 38dbd79d09..42085e2e64 100755 --- a/core/alien/libraries/libraries.factor +++ b/core/alien/libraries/libraries.factor @@ -3,7 +3,7 @@ USING: accessors alien alien.strings assocs compiler.errors io.backend kernel namespaces destructors sequences strings system io.pathnames fry combinators vocabs ; -IN: alien.libraries +in: alien.libraries PRIMITIVE: dll-valid? ( dll -- ? ) PRIMITIVE: (dlopen) ( path -- dll ) @@ -19,7 +19,7 @@ PRIMITIVE: (dlsym-raw) ( name dll -- alien ) HOOK: dlerror os ( -- message/f ) -SYMBOL: libraries +symbol: libraries libraries [ H{ } clone ] initialize @@ -89,7 +89,7 @@ M: library dispose dll>> [ dispose ] when* ; 2dup load-library dlsym-raw [ 2nip ] [ no-such-symbol ] if* ; -SYMBOL: deploy-libraries +symbol: deploy-libraries deploy-libraries [ V{ } clone ] initialize diff --git a/core/alien/strings/strings-docs.factor b/core/alien/strings/strings-docs.factor index 9caa02bb5b..e4210c0466 100644 --- a/core/alien/strings/strings-docs.factor +++ b/core/alien/strings/strings-docs.factor @@ -1,6 +1,6 @@ USING: help.markup help.syntax strings byte-arrays alien libc debugger io.encodings.string sequences ; -IN: alien.strings +in: alien.strings HELP: string>alien { $values { "string" string } { "encoding" "an encoding descriptor" } { "byte-array" byte-array } } diff --git a/core/alien/strings/strings-tests.factor b/core/alien/strings/strings-tests.factor index b554b1bcfa..b114998360 100644 --- a/core/alien/strings/strings-tests.factor +++ b/core/alien/strings/strings-tests.factor @@ -1,7 +1,7 @@ USING: alien.strings alien.c-types alien.data tools.test kernel libc io.encodings.utf8 io.encodings.utf16 io.encodings.utf16n io.encodings.ascii alien io.encodings.string io.encodings.8-bit.latin1 ; -IN: alien.strings.tests +in: alien.strings.tests { "\u0000ff" } [ "\u0000ff" latin1 string>alien latin1 alien>string ] diff --git a/core/alien/strings/strings.factor b/core/alien/strings/strings.factor index b5d92e02a0..d0c3704f0c 100644 --- a/core/alien/strings/strings.factor +++ b/core/alien/strings/strings.factor @@ -5,7 +5,7 @@ io.encodings io.encodings.ascii io.encodings.utf16n io.encodings.utf8 io.streams.memory kernel kernel.private math namespaces sequences sequences.private strings strings.private system system.private ; -IN: alien.strings +in: alien.strings GENERIC# alien>string 1 ( c-ptr encoding -- string/f ) diff --git a/core/arrays/arrays-docs.factor b/core/arrays/arrays-docs.factor index d71649ef6c..5c049dd336 100644 --- a/core/arrays/arrays-docs.factor +++ b/core/arrays/arrays-docs.factor @@ -1,6 +1,6 @@ USING: help.markup help.syntax kernel kernel.private prettyprint sequences.private sequences ; -IN: arrays +in: arrays ARTICLE: "arrays-unsafe" "Unsafe array operations" "These two words are used internally by the Factor implementation. User code should never need to call them; instead use " { $link nth } " and " { $link set-nth } "." diff --git a/core/arrays/arrays.factor b/core/arrays/arrays.factor index 1666bdb4a4..6071002ecd 100644 --- a/core/arrays/arrays.factor +++ b/core/arrays/arrays.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2005, 2010 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: accessors kernel math sequences sequences.private ; -IN: arrays +in: arrays BUILTIN: array { length array-capacity read-only initial: 0 } ; diff --git a/core/assocs/assocs-docs.factor b/core/assocs/assocs-docs.factor index 69591c7463..5835015f1d 100644 --- a/core/assocs/assocs-docs.factor +++ b/core/assocs/assocs-docs.factor @@ -3,7 +3,7 @@ USING: help.markup help.syntax kernel sequences sequences.private namespaces math quotations assocs.private sets ; -IN: assocs +in: assocs ARTICLE: "alists" "Association lists" "An " { $emphasis "association list" } ", abbreviated " { $emphasis "alist" } ", is an association represented as a sequence where all elements are key/value pairs. The " { $link sequence } " mixin is an instance of the " { $link assoc } " mixin, hence all sequences support the " { $link "assocs-protocol" } " in this way." diff --git a/core/assocs/assocs-tests.factor b/core/assocs/assocs-tests.factor index 1acd43dc00..cbfa6a51bf 100644 --- a/core/assocs/assocs-tests.factor +++ b/core/assocs/assocs-tests.factor @@ -1,8 +1,8 @@ USING: alien.c-types assocs kernel make math namespaces sequences specialized-arrays tools.test ; -IN: assocs.tests +in: assocs.tests SPECIALIZED-ARRAY: double -IN: assocs.tests +in: assocs.tests { t } [ H{ } dup assoc-subset? ] unit-test { f } [ H{ { 1 3 } } H{ } assoc-subset? ] unit-test diff --git a/core/assocs/assocs.factor b/core/assocs/assocs.factor index 68cf697a09..ff944f8754 100644 --- a/core/assocs/assocs.factor +++ b/core/assocs/assocs.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors arrays kernel math sequences sequences.private vectors ; -IN: assocs +in: assocs MIXIN: assoc diff --git a/core/bootstrap/primitives-docs.factor b/core/bootstrap/primitives-docs.factor index cc051e3a13..36bdb0b9da 100644 --- a/core/bootstrap/primitives-docs.factor +++ b/core/bootstrap/primitives-docs.factor @@ -1,5 +1,5 @@ USING: bootstrap.image.private effects help.markup help.syntax strings ; -IN: bootstrap.primitives +in: bootstrap.primitives ARTICLE: "bootstrap.primitives" "Bootstrap primitives" "A script file run to create the bootstrap image. Also see the vocab " { $link "bootstrap.image.primitives" } "." ; diff --git a/core/bootstrap/primitives.factor b/core/bootstrap/primitives.factor index 4ba2cf5079..2bb4922bb9 100755 --- a/core/bootstrap/primitives.factor +++ b/core/bootstrap/primitives.factor @@ -7,7 +7,7 @@ classes.tuple.private classes.union combinators compiler.units io kernel kernel.private layouts make math math.private namespaces parser quotations sequences slots source-files splitting vocabs vocabs.loader words ; -IN: bootstrap.primitives +in: bootstrap.primitives "* Creating primitives and basic runtime structures..." print flush diff --git a/core/bootstrap/stage1.factor b/core/bootstrap/stage1.factor index 3dd7f0b2a5..303faee665 100644 --- a/core/bootstrap/stage1.factor +++ b/core/bootstrap/stage1.factor @@ -5,7 +5,7 @@ hashtables.wrapped init io io.files kernel kernel.private make memory namespaces parser parser.notes sequences system vocabs vocabs.loader vocabs.hierarchy ; QUALIFIED: bootstrap.image.private -IN: bootstrap.stage1 +in: bootstrap.stage1 "Bootstrap stage 1..." print flush diff --git a/core/bootstrap/syntax.factor b/core/bootstrap/syntax.factor index 58a186e057..1e0a6a37e1 100644 --- a/core/bootstrap/syntax.factor +++ b/core/bootstrap/syntax.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: words words.symbol sequences vocabs kernel compiler.units ; -IN: bootstrap.syntax +in: bootstrap.syntax [ "syntax" create-vocab drop diff --git a/core/byte-arrays/byte-arrays-docs.factor b/core/byte-arrays/byte-arrays-docs.factor index eeb0832af8..33cb5ee5ba 100644 --- a/core/byte-arrays/byte-arrays-docs.factor +++ b/core/byte-arrays/byte-arrays-docs.factor @@ -1,5 +1,5 @@ USING: kernel help.markup help.syntax sequences ; -IN: byte-arrays +in: byte-arrays ARTICLE: "byte-arrays" "Byte arrays" "Byte arrays are fixed-size mutable sequences (" { $link "sequence-protocol" } ") whose elements are integers in the range 0-255, inclusive. Each element only uses one byte of storage, hence the name. The literal syntax is covered in " { $link "syntax-byte-arrays" } "." diff --git a/core/byte-arrays/byte-arrays.factor b/core/byte-arrays/byte-arrays.factor index 36a54b9515..a574d3fa4e 100644 --- a/core/byte-arrays/byte-arrays.factor +++ b/core/byte-arrays/byte-arrays.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors alien.accessors kernel math sequences sequences.private ; -IN: byte-arrays +in: byte-arrays BUILTIN: byte-array { length array-capacity read-only initial: 0 } ; diff --git a/core/byte-vectors/byte-vectors-docs.factor b/core/byte-vectors/byte-vectors-docs.factor index 72e3741e72..e3abf89f65 100644 --- a/core/byte-vectors/byte-vectors-docs.factor +++ b/core/byte-vectors/byte-vectors-docs.factor @@ -1,5 +1,5 @@ USING: help.markup help.syntax sequences ; -IN: byte-vectors +in: byte-vectors ARTICLE: "byte-vectors" "Byte vectors" "The " { $vocab-link "byte-vectors" } " vocabulary implements resizable mutable sequence of unsigned bytes. Byte vectors implement the " { $link "sequence-protocol" } " and thus all " { $link "sequences" } " can be used with them." diff --git a/core/byte-vectors/byte-vectors-tests.factor b/core/byte-vectors/byte-vectors-tests.factor index 2c3ee98221..6f4132005c 100644 --- a/core/byte-vectors/byte-vectors-tests.factor +++ b/core/byte-vectors/byte-vectors-tests.factor @@ -1,6 +1,6 @@ USING: byte-vectors math prettyprint sequences tools.test vectors ; -IN: byte-vectors.tests +in: byte-vectors.tests { 0 } [ 123 length ] unit-test diff --git a/core/byte-vectors/byte-vectors.factor b/core/byte-vectors/byte-vectors.factor index b53fd3866d..a90509ab27 100644 --- a/core/byte-vectors/byte-vectors.factor +++ b/core/byte-vectors/byte-vectors.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors byte-arrays growable kernel math sequences sequences.private ; -IN: byte-vectors +in: byte-vectors TUPLE: byte-vector { underlying byte-array } diff --git a/core/checksums/checksums-docs.factor b/core/checksums/checksums-docs.factor index 6ea24b559b..b05229504b 100644 --- a/core/checksums/checksums-docs.factor +++ b/core/checksums/checksums-docs.factor @@ -1,5 +1,5 @@ USING: byte-arrays help.markup help.syntax sequences strings ; -IN: checksums +in: checksums HELP: checksum { $class-description "The class of checksum algorithms." } ; diff --git a/core/checksums/checksums.factor b/core/checksums/checksums.factor index bd494bc051..c02fc7355c 100644 --- a/core/checksums/checksums.factor +++ b/core/checksums/checksums.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors byte-arrays byte-vectors io io.backend io.files kernel math math.parser sequences ; -IN: checksums +in: checksums MIXIN: checksum diff --git a/core/checksums/crc32/crc32-docs.factor b/core/checksums/crc32/crc32-docs.factor index 512e433eb5..6dc396358d 100644 --- a/core/checksums/crc32/crc32-docs.factor +++ b/core/checksums/crc32/crc32-docs.factor @@ -1,5 +1,5 @@ USING: help.markup help.syntax math ; -IN: checksums.crc32 +in: checksums.crc32 HELP: crc32 { $class-description "The CRC32 checksum algorithm." } ; diff --git a/core/checksums/crc32/crc32.factor b/core/checksums/crc32/crc32.factor index da3df72974..4f22eb5d5f 100644 --- a/core/checksums/crc32/crc32.factor +++ b/core/checksums/crc32/crc32.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: checksums io.binary kernel math sequences sequences.private ; -IN: checksums.crc32 +in: checksums.crc32 CONSTANT: crc32-polynomial 0xedb88320 @@ -19,7 +19,7 @@ CONSTANT: crc32-table V{ } mask-byte crc32-table nth-unsafe swap -8 shift bitxor ; inline -SINGLETON: crc32 +singleton: crc32 INSTANCE: crc32 checksum diff --git a/core/classes/algebra/algebra-docs.factor b/core/classes/algebra/algebra-docs.factor index 01663ad116..666ddc980a 100644 --- a/core/classes/algebra/algebra-docs.factor +++ b/core/classes/algebra/algebra-docs.factor @@ -1,6 +1,6 @@ USING: classes classes.private help.markup help.syntax kernel math sequences ; -IN: classes.algebra +in: classes.algebra ARTICLE: "class-operations" "Class operations" "Set-theoretic operations on classes:" diff --git a/core/classes/algebra/algebra-tests.factor b/core/classes/algebra/algebra-tests.factor index d9ac9263ac..f9aee4fe93 100644 --- a/core/classes/algebra/algebra-tests.factor +++ b/core/classes/algebra/algebra-tests.factor @@ -2,7 +2,7 @@ USING: accessors arrays assocs classes classes.algebra classes.tuple classes.union generic generic.private growable kernel math prettyprint quotations random sbufs sequences stack-checker strings tools.test vectors words ; -IN: classes.algebra.tests +in: classes.algebra.tests TUPLE: first-one ; TUPLE: second-one ; @@ -26,9 +26,9 @@ UNION: x1 a1 b1 ; UNION: y1 a1 c1 ; UNION: z1 b1 c1 ; -SINGLETON: sa -SINGLETON: sb -SINGLETON: sc +singleton: sa +singleton: sb +singleton: sc INTERSECTION: empty-intersection ; @@ -334,7 +334,7 @@ MIXIN: empty-mixin ] unit-test ] times -SINGLETON: xxx +singleton: xxx UNION: yyy xxx ; { { yyy xxx } } [ { xxx yyy } sort-classes ] unit-test diff --git a/core/classes/algebra/algebra.factor b/core/classes/algebra/algebra.factor index 0103126d6a..8c5b5bb8d6 100644 --- a/core/classes/algebra/algebra.factor +++ b/core/classes/algebra/algebra.factor @@ -3,7 +3,7 @@ USING: accessors arrays assocs classes classes.private combinators kernel make math math.order namespaces sequences sets sorting vectors words ; -IN: classes.algebra +in: classes.algebra DEFER: sort-classes @@ -107,7 +107,7 @@ PRIVATE> : class-or ( first second -- class ) class-or-cache get [ (class-or) ] symmetric-class-op ; -SYMBOL: +incomparable+ +symbol: +incomparable+ : compare-classes ( first second -- <=> ) [ swap class<= ] [ class<= ] 2bi diff --git a/core/classes/builtin/builtin-docs.factor b/core/classes/builtin/builtin-docs.factor index 6b2c56dfb2..f7db063afa 100644 --- a/core/classes/builtin/builtin-docs.factor +++ b/core/classes/builtin/builtin-docs.factor @@ -1,5 +1,5 @@ USING: help.syntax help.markup classes layouts ; -IN: classes.builtin +in: classes.builtin ARTICLE: "builtin-classes" "Built-in classes" "Every object is an instance of exactly one canonical " { $emphasis "built-in class" } " which defines its layout in memory and basic behavior." diff --git a/core/classes/builtin/builtin-tests.factor b/core/classes/builtin/builtin-tests.factor index acfa8725e2..ff799ef0d2 100644 --- a/core/classes/builtin/builtin-tests.factor +++ b/core/classes/builtin/builtin-tests.factor @@ -1,5 +1,5 @@ USING: accessors kernel memory sequences tools.test words ; -IN: classes.builtin.tests +in: classes.builtin.tests { f } [ [ word? ] instances diff --git a/core/classes/builtin/builtin.factor b/core/classes/builtin/builtin.factor index 72178f62f2..80c9f3a2de 100644 --- a/core/classes/builtin/builtin.factor +++ b/core/classes/builtin/builtin.factor @@ -2,9 +2,9 @@ ! See http://factorcode.org/license.txt for BSD license. USING: classes classes.algebra.private classes.private kernel kernel.private make namespaces sequences words ; -IN: classes.builtin +in: classes.builtin -SYMBOL: builtins +symbol: builtins PREDICATE: builtin-class < class "metaclass" word-prop builtin-class eq? ; diff --git a/core/classes/classes-docs.factor b/core/classes/classes-docs.factor index 05e88b9663..b16c99e3d3 100644 --- a/core/classes/classes-docs.factor +++ b/core/classes/classes-docs.factor @@ -1,6 +1,6 @@ USING: classes.private help.markup help.syntax kernel quotations sequences words ; -IN: classes +in: classes ARTICLE: "class-predicates" "Class predicate words" "With a handful of exceptions, each class has a membership predicate word, named " { $snippet { $emphasis "class" } "?" } ". A quotation calling this predicate is stored in the " { $snippet "\"predicate\"" } " word property." diff --git a/core/classes/classes-tests.factor b/core/classes/classes-tests.factor index dfc74fe69c..936db22b61 100644 --- a/core/classes/classes-tests.factor +++ b/core/classes/classes-tests.factor @@ -1,7 +1,7 @@ USING: assocs classes classes.private compiler.units definitions eval generic io.streams.string kernel math multiline namespaces parser sequences sets sorting tools.test vocabs words ; -IN: classes.tests +in: classes.tests { t } [ 3 object instance? ] unit-test { t } [ 3 fixnum instance? ] unit-test @@ -26,7 +26,7 @@ M: method-forget-class method-forget-test ; ] unit-test ! Long-standing problem -USE: multiline +use: multiline ! So the user has some code... { } [ diff --git a/core/classes/classes.factor b/core/classes/classes.factor index fefdf97f6d..66cbae51a9 100644 --- a/core/classes/classes.factor +++ b/core/classes/classes.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors assocs combinators definitions graphs kernel make namespaces quotations sequences sets words words.symbol ; -IN: classes +in: classes ERROR: bad-inheritance class superclass ; @@ -16,12 +16,12 @@ INSTANCE: defining-class classoid ; diff --git a/core/classes/predicate/predicate.factor b/core/classes/predicate/predicate.factor index 857d8599d0..87b5c45bab 100644 --- a/core/classes/predicate/predicate.factor +++ b/core/classes/predicate/predicate.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: classes classes.algebra classes.algebra.private classes.private kernel make words ; -IN: classes.predicate +in: classes.predicate PREDICATE: predicate-class < class "metaclass" word-prop predicate-class eq? ; diff --git a/core/classes/singleton/singleton-docs.factor b/core/classes/singleton/singleton-docs.factor index 698aa1a682..b9a822cae0 100644 --- a/core/classes/singleton/singleton-docs.factor +++ b/core/classes/singleton/singleton-docs.factor @@ -1,5 +1,5 @@ USING: help.markup help.syntax kernel words ; -IN: classes.singleton +in: classes.singleton ARTICLE: "singletons" "Singleton classes" "A singleton is a class with only one instance and with no state." diff --git a/core/classes/singleton/singleton-tests.factor b/core/classes/singleton/singleton-tests.factor index 279ac39440..9e39a4888f 100644 --- a/core/classes/singleton/singleton-tests.factor +++ b/core/classes/singleton/singleton-tests.factor @@ -1,5 +1,5 @@ USING: classes.singleton io.streams.string kernel see tools.test ; -IN: classes.singleton.tests +in: classes.singleton.tests { } [ SINGLETON: bzzt ] unit-test { t } [ bzzt bzzt? ] unit-test @@ -11,7 +11,7 @@ GENERIC: zammo ( obj -- str ) { t } [ omg singleton-class? ] unit-test { "IN: classes.singleton.tests\nSINGLETON: omg\n" } [ [ omg see ] with-string-writer ] unit-test -SINGLETON: word-and-singleton +singleton: word-and-singleton : word-and-singleton ( -- x ) 3 ; diff --git a/core/classes/singleton/singleton.factor b/core/classes/singleton/singleton.factor index 57206a82cc..015a69175c 100644 --- a/core/classes/singleton/singleton.factor +++ b/core/classes/singleton/singleton.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: classes classes.algebra.private classes.predicate classes.predicate.private kernel sequences words ; -IN: classes.singleton +in: classes.singleton ( x y w h -- rect ) rect boa ; @@ -191,7 +191,7 @@ M: vector silly "z" ; { "zz" } [ 123 silly nip ] unit-test ! Typo -SYMBOL: not-a-tuple-class +symbol: not-a-tuple-class ! Missing check [ not-a-tuple-class boa ] must-fail diff --git a/core/classes/tuple/tuple.factor b/core/classes/tuple/tuple.factor index 1f5ce09bcb..a923fb7be1 100644 --- a/core/classes/tuple/tuple.factor +++ b/core/classes/tuple/tuple.factor @@ -5,7 +5,7 @@ classes.algebra.private classes.builtin classes.private combinators definitions effects generic kernel kernel.private make math math.private memory namespaces quotations sequences sequences.private slots slots.private strings words ; -IN: classes.tuple +in: classes.tuple ( layout -- tuple ) @@ -211,7 +211,7 @@ M: object final-class? drop f ; : apply-slot-permutation ( old-values triples -- new-values ) [ first3 update-slot ] with map ; -SYMBOL: outdated-tuples +symbol: outdated-tuples : permute-slots ( old-values layout -- new-values ) [ first all-slots ] [ outdated-tuples get at ] bi diff --git a/core/classes/union/union-docs.factor b/core/classes/union/union-docs.factor index bd7e520f61..9a3dcfba1d 100644 --- a/core/classes/union/union-docs.factor +++ b/core/classes/union/union-docs.factor @@ -1,7 +1,7 @@ USING: generic help.markup help.syntax kernel kernel.private namespaces sequences words arrays help effects math classes.private classes compiler.units ; -IN: classes.union +in: classes.union ARTICLE: "unions" "Union classes" "An object is an instance of a union class if it is an instance of one of its members." diff --git a/core/classes/union/union-tests.factor b/core/classes/union/union-tests.factor index f08cde6cda..c9569cf15a 100644 --- a/core/classes/union/union-tests.factor +++ b/core/classes/union/union-tests.factor @@ -2,7 +2,7 @@ USING: accessors alien assocs classes classes.algebra classes.predicate classes.union classes.union.private compiler.units eval io.streams.string kernel math math.private parser quotations see sequences slots strings tools.test words ; -IN: classes.union.tests +in: classes.union.tests ! DEFER: bah ! FORGET: bah @@ -134,7 +134,7 @@ PREDICATE: numba-ova-10 < union{ float integer } [ "IN: issue-420 UNION: omg omg ;" eval( -- ) ] [ error>> cannot-reference-self? ] must-fail-with -IN: issue-420 +in: issue-420 UNION: a ; UNION: b a ; diff --git a/core/classes/union/union.factor b/core/classes/union/union.factor index 0e4cf5742a..6dd091d3eb 100644 --- a/core/classes/union/union.factor +++ b/core/classes/union/union.factor @@ -4,7 +4,7 @@ USING: accessors assocs classes classes.algebra classes.algebra.private classes.builtin classes.private combinators definitions kernel kernel.private math math.private quotations sequences sets words ; -IN: classes.union +in: classes.union PREDICATE: union-class < class "metaclass" word-prop union-class eq? ; diff --git a/core/combinators/combinators-docs.factor b/core/combinators/combinators-docs.factor index b837c10b2b..eb9b8e3421 100644 --- a/core/combinators/combinators-docs.factor +++ b/core/combinators/combinators-docs.factor @@ -2,7 +2,7 @@ USING: arrays help.markup help.syntax strings sbufs vectors kernel quotations generic generic.standard classes math assocs sequences sequences.private combinators.private effects words ; -IN: combinators +in: combinators ARTICLE: "cleave-combinators" "Cleave combinators" "The cleave combinators apply multiple quotations to a single value or set of values." diff --git a/core/combinators/combinators-tests.factor b/core/combinators/combinators-tests.factor index f428666a0d..ca098d0206 100644 --- a/core/combinators/combinators-tests.factor +++ b/core/combinators/combinators-tests.factor @@ -1,7 +1,7 @@ USING: accessors arrays combinators combinators.private io kernel math math.functions prettyprint sequences stack-checker tools.test words ; -IN: combinators.tests +in: combinators.tests { 3 } [ 1 2 [ + ] call( x y -- z ) ] unit-test [ 1 2 [ + ] call( -- z ) ] must-fail diff --git a/core/combinators/combinators.factor b/core/combinators/combinators.factor index f348155d36..9989da6303 100644 --- a/core/combinators/combinators.factor +++ b/core/combinators/combinators.factor @@ -3,7 +3,7 @@ USING: accessors arrays assocs hashtables kernel kernel.private make math math.order math.private quotations sequences sequences.private sets sorting words ; -IN: combinators +in: combinators ! Most of these combinators have compile-time expansions in ! the optimizing compiler. See stack-checker.transforms and diff --git a/core/combinators/short-circuit/short-circuit-docs.factor b/core/combinators/short-circuit/short-circuit-docs.factor index ca7c1d53c4..0a61e83c92 100644 --- a/core/combinators/short-circuit/short-circuit-docs.factor +++ b/core/combinators/short-circuit/short-circuit-docs.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: help.markup help.syntax io.streams.string quotations math kernel ; -IN: combinators.short-circuit +in: combinators.short-circuit HELP: 0&& { $values { "quots" "a sequence of quotations with stack effect " { $snippet "( -- ? )" } } { "?" "the result of the last quotation, or " { $link f } } } diff --git a/core/combinators/short-circuit/short-circuit-tests.factor b/core/combinators/short-circuit/short-circuit-tests.factor index ae4fdd8a8a..12577f8d13 100644 --- a/core/combinators/short-circuit/short-circuit-tests.factor +++ b/core/combinators/short-circuit/short-circuit-tests.factor @@ -1,6 +1,6 @@ USING: accessors combinators.short-circuit kernel math tools.test ; -IN: combinators.short-circuit.tests +in: combinators.short-circuit.tests { 3 } [ { [ 1 ] [ 2 ] [ 3 ] } 0&& ] unit-test { 5 } [ 3 { [ 0 > ] [ odd? ] [ 2 + ] } 1&& ] unit-test diff --git a/core/combinators/short-circuit/short-circuit.factor b/core/combinators/short-circuit/short-circuit.factor index 9e59d5ee9e..e59009881e 100644 --- a/core/combinators/short-circuit/short-circuit.factor +++ b/core/combinators/short-circuit/short-circuit.factor @@ -1,6 +1,6 @@ USING: arrays combinators fry generalizations kernel macros math sequences ; -IN: combinators.short-circuit +in: combinators.short-circuit > ; M: user-init-error error-line line#>> ; M: user-init-error error-type drop +user-init-error+ ; -SYMBOL: executable -SYMBOL: script -SYMBOL: command-line +symbol: executable +symbol: script +symbol: command-line : (command-line) ( -- args ) OBJ-ARGS special-object sift [ alien>native-string ] map ; @@ -84,7 +84,7 @@ SYMBOL: command-line unclip executable set (parse-command-line) ; -SYMBOL: main-vocab-hook +symbol: main-vocab-hook : main-vocab ( -- vocab ) embedded? [ diff --git a/core/command-line/debugger/debugger.factor b/core/command-line/debugger/debugger.factor index 5b25d83e03..9ba6c53c11 100644 --- a/core/command-line/debugger/debugger.factor +++ b/core/command-line/debugger/debugger.factor @@ -1,6 +1,6 @@ USING: accessors debugger io kernel make math.parser prettyprint command-line summary ; -IN: command-line.debugger +in: command-line.debugger M: user-init-error error. error>> error. ; diff --git a/core/command-line/startup/startup.factor b/core/command-line/startup/startup.factor index 66e95bdff2..aea1afd7ec 100644 --- a/core/command-line/startup/startup.factor +++ b/core/command-line/startup/startup.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: command-line eval io io.pathnames kernel namespaces sequences system vocabs.loader ; -IN: command-line.startup +in: command-line.startup : cli-usage ( -- ) "Usage: " write vm-path file-name write " [Factor arguments] [script] [script arguments] diff --git a/core/compiler/errors/errors-docs.factor b/core/compiler/errors/errors-docs.factor index 6dbe5193aa..4e464bc361 100644 --- a/core/compiler/errors/errors-docs.factor +++ b/core/compiler/errors/errors-docs.factor @@ -1,4 +1,4 @@ -IN: compiler.errors +in: compiler.errors USING: help.markup help.syntax vocabs.loader words io quotations words.symbol ; diff --git a/core/compiler/errors/errors.factor b/core/compiler/errors/errors.factor index 2c61621762..217ed81b60 100644 --- a/core/compiler/errors/errors.factor +++ b/core/compiler/errors/errors.factor @@ -2,10 +2,10 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors assocs command-line fry kernel namespaces source-files.errors summary ; -IN: compiler.errors +in: compiler.errors -SYMBOL: +compiler-error+ -SYMBOL: compiler-errors +symbol: +compiler-error+ +symbol: compiler-errors compiler-errors [ H{ } clone ] initialize @@ -13,8 +13,8 @@ TUPLE: compiler-error < source-file-error ; M: compiler-error error-type drop +compiler-error+ ; -SYMBOL: +linkage-error+ -SYMBOL: linkage-errors +symbol: +linkage-error+ +symbol: linkage-errors linkage-errors [ H{ } clone ] initialize diff --git a/core/compiler/units/units-docs.factor b/core/compiler/units/units-docs.factor index a65dddb81a..216aa48b62 100644 --- a/core/compiler/units/units-docs.factor +++ b/core/compiler/units/units-docs.factor @@ -1,7 +1,7 @@ USING: compiler.units.private definitions help.markup help.syntax kernel kernel.private parser quotations sequences source-files stack-checker.errors words ; -IN: compiler.units +in: compiler.units ARTICLE: "compilation-units-internals" "Compilation units internals" "These words do not need to be called directly, and only serve to support the implementation." diff --git a/core/compiler/units/units-tests.factor b/core/compiler/units/units-tests.factor index 7a8bfc0d8d..ce3be10e91 100644 --- a/core/compiler/units/units-tests.factor +++ b/core/compiler/units/units-tests.factor @@ -1,6 +1,6 @@ USING: arrays compiler compiler.units definitions eval fry kernel math namespaces quotations sequences tools.test words ; -IN: compiler.units.tests +in: compiler.units.tests [ [ [ ] define-temp ] with-compilation-unit ] must-infer [ [ [ ] define-temp ] with-nested-compilation-unit ] must-infer @@ -30,11 +30,11 @@ IN: compiler.units.tests ] unit-test ! Check that we notify observers -SINGLETON: observer +singleton: observer observer add-definition-observer -SYMBOL: counter +symbol: counter 0 counter set-global diff --git a/core/compiler/units/units.factor b/core/compiler/units/units.factor index b90306a9cb..6fb78bd588 100644 --- a/core/compiler/units/units.factor +++ b/core/compiler/units/units.factor @@ -4,12 +4,12 @@ USING: accessors arrays assocs classes classes.private classes.tuple.private continuations definitions generic hash-sets init kernel kernel.private math namespaces sequences sets source-files.errors vocabs words ; -IN: compiler.units +in: compiler.units PRIMITIVE: modify-code-heap ( alist update-existing? reset-pics? -- ) -SYMBOL: old-definitions -SYMBOL: new-definitions +symbol: old-definitions +symbol: new-definitions TUPLE: redefine-error def ; @@ -42,7 +42,7 @@ PRIVATE> new-definitions get [ in? ] with any? not ] [ drop f ] if ; -SYMBOL: compiler-impl +symbol: compiler-impl HOOK: update-call-sites compiler-impl ( class generic -- words ) @@ -84,7 +84,7 @@ M: f process-forgotten-words drop ; : ( -- pair ) { HS{ } HS{ } } [ clone ] map ; -SYMBOL: definition-observers +symbol: definition-observers GENERIC: definitions-changed ( set obj -- ) diff --git a/core/continuations/continuations-docs.factor b/core/continuations/continuations-docs.factor index 56da38d46f..c21205be4d 100644 --- a/core/continuations/continuations-docs.factor +++ b/core/continuations/continuations-docs.factor @@ -1,6 +1,6 @@ USING: continuations.private help.markup help.syntax kernel kernel.private lexer namespaces quotations sequences vectors ; -IN: continuations +in: continuations ARTICLE: "errors-restartable" "Restartable errors" "Support for restartable errors is built on top of the basic error handling facility. The following words signals recoverable errors:" diff --git a/core/continuations/continuations-tests.factor b/core/continuations/continuations-tests.factor index 6ea528438a..4e0e422372 100644 --- a/core/continuations/continuations-tests.factor +++ b/core/continuations/continuations-tests.factor @@ -1,7 +1,7 @@ USING: accessors continuations debugger eval io kernel kernel.private math memory namespaces sequences tools.test vectors words ; -IN: continuations.tests +in: continuations.tests : (callcc1-test) ( n obj -- n' obj ) [ 1 - dup ] dip ?push @@ -62,8 +62,8 @@ IN: continuations.tests { 1 } [ "c" get innermost-frame-scan ] unit-test -SYMBOL: always-counter -SYMBOL: error-counter +symbol: always-counter +symbol: error-counter H{ { always-counter 0 } diff --git a/core/continuations/continuations.factor b/core/continuations/continuations.factor index a3402e7a16..e3a21acbdf 100644 --- a/core/continuations/continuations.factor +++ b/core/continuations/continuations.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors assocs combinators combinators.private kernel kernel.private make namespaces sequences vectors ; -IN: continuations +in: continuations : with-datastack ( stack quot -- new-stack ) [ @@ -11,11 +11,11 @@ IN: continuations swap [ set-datastack ] dip ] ( stack quot -- new-stack ) call-effect-unsafe ; -SYMBOL: original-error -SYMBOL: error -SYMBOL: error-continuation -SYMBOL: error-thread -SYMBOL: restarts +symbol: original-error +symbol: error +symbol: error-continuation +symbol: error-thread +symbol: restarts : continue ( continuation -- * ) f swap continue-with ; -SYMBOL: return-continuation +symbol: return-continuation : with-return ( quot -- ) [ return-continuation ] dip [ with-variable ] 2curry callcc0 ; inline @@ -117,14 +117,14 @@ PRIVATE> GENERIC: error-in-thread ( error thread -- * ) -SYMBOL: thread-error-hook ! ( error thread -- * ) +symbol: thread-error-hook ! ( error thread -- * ) M: object error-in-thread thread-error-hook get-global call( error thread -- * ) ; : in-callback? ( -- ? ) CONTEXT-OBJ-IN-CALLBACK-P context-object ; -SYMBOL: callback-error-hook ! ( error -- * ) +symbol: callback-error-hook ! ( error -- * ) : rethrow ( error -- * ) dup save-error diff --git a/core/cpu/architecture/architecture-docs.factor b/core/cpu/architecture/architecture-docs.factor index abaed8e185..2f4580e41a 100644 --- a/core/cpu/architecture/architecture-docs.factor +++ b/core/cpu/architecture/architecture-docs.factor @@ -2,7 +2,7 @@ USING: alien assocs classes compiler.cfg.instructions compiler.cfg.registers compiler.cfg.stack-frame cpu.x86.assembler cpu.x86.assembler.operands help.markup help.syntax kernel layouts literals math multiline sequences strings system vm words ; -IN: cpu.architecture +in: cpu.architecture << STRING: ex-%allot diff --git a/core/cpu/architecture/architecture-tests.factor b/core/cpu/architecture/architecture-tests.factor index 41acbfb518..c961c3aff1 100644 --- a/core/cpu/architecture/architecture-tests.factor +++ b/core/cpu/architecture/architecture-tests.factor @@ -1,7 +1,7 @@ USING: accessors compiler.cfg compiler.cfg.instructions compiler.cfg.stack-frame compiler.cfg.utilities cpu.architecture cpu.x86 kernel layouts math namespaces system tools.test ; -IN: cpu.architecture.tests +in: cpu.architecture.tests : cfg-w-spill-area-base ( base -- cfg ) stack-frame new swap >>spill-area-base diff --git a/core/cpu/architecture/architecture.factor b/core/cpu/architecture/architecture.factor index 7ab49574aa..6336b40149 100644 --- a/core/cpu/architecture/architecture.factor +++ b/core/cpu/architecture/architecture.factor @@ -4,13 +4,13 @@ USING: accessors arrays assocs generic kernel kernel.private math math.order memory namespaces make sequences layouts system hashtables classes alien byte-arrays combinators words sets fry ; -IN: cpu.architecture +in: cpu.architecture ! Representations -- these are like low-level types ! Unknown representation; this is used for ##copy instructions which ! get eliminated later -SINGLETON: any-rep +singleton: any-rep ! Integer registers can contain data with one of these three representations ! tagged-rep: tagged pointer or fixnum diff --git a/core/definitions/definitions-docs.factor b/core/definitions/definitions-docs.factor index b609c26f72..8c0dd11891 100644 --- a/core/definitions/definitions-docs.factor +++ b/core/definitions/definitions-docs.factor @@ -1,6 +1,6 @@ USING: generic hash-sets help.markup help.syntax words math source-files parser quotations compiler.units ; -IN: definitions +in: definitions ARTICLE: "definition-protocol" "Definition protocol" "A common protocol is used to build generic tools for working with all definitions." diff --git a/core/definitions/definitions-tests.factor b/core/definitions/definitions-tests.factor index cf0c6daa4d..cd21fd5bc3 100644 --- a/core/definitions/definitions-tests.factor +++ b/core/definitions/definitions-tests.factor @@ -1,18 +1,18 @@ USING: arrays bit-arrays byte-arrays compiler.units definitions tools.test ; -IN: definitions.tests +in: definitions.tests GENERIC: some-generic ( a -- b ) -USE: arrays +use: arrays M: array some-generic ; -USE: bit-arrays +use: bit-arrays M: bit-array some-generic ; -USE: byte-arrays +use: byte-arrays M: byte-array some-generic ; diff --git a/core/definitions/definitions.factor b/core/definitions/definitions.factor index 350268630c..e9019ab4c0 100644 --- a/core/definitions/definitions.factor +++ b/core/definitions/definitions.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2006, 2010 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: accessors assocs kernel namespaces sequences sets ; -IN: definitions +in: definitions MIXIN: definition-mixin @@ -10,21 +10,21 @@ ERROR: no-compilation-unit definition ; : add-to-unit ( key set -- ) [ adjoin ] [ no-compilation-unit ] if* ; -SYMBOL: changed-definitions +symbol: changed-definitions : changed-definition ( defspec -- ) changed-definitions get add-to-unit ; -SYMBOL: maybe-changed +symbol: maybe-changed : changed-conditionally ( class -- ) maybe-changed get add-to-unit ; -SYMBOL: changed-effects +symbol: changed-effects -SYMBOL: outdated-generics +symbol: outdated-generics -SYMBOL: new-words +symbol: new-words : new-word ( word -- ) new-words get add-to-unit ; @@ -37,7 +37,7 @@ GENERIC: set-where ( loc defspec -- ) GENERIC: forget* ( defspec -- ) -SYMBOL: forgotten-definitions +symbol: forgotten-definitions : forgotten-definition ( defspec -- ) forgotten-definitions get add-to-unit ; diff --git a/core/delegate/delegate-docs.factor b/core/delegate/delegate-docs.factor index ac82c0004c..3cda432fe4 100644 --- a/core/delegate/delegate-docs.factor +++ b/core/delegate/delegate-docs.factor @@ -1,5 +1,5 @@ USING: help.syntax help.markup delegate.private ; -IN: delegate +in: delegate HELP: define-protocol { $values { "protocol" "a word for the new protocol" } { "wordlist" "a sequence of words" } } diff --git a/core/delegate/delegate-tests.factor b/core/delegate/delegate-tests.factor index 845e227e61..08557d93a9 100644 --- a/core/delegate/delegate-tests.factor +++ b/core/delegate/delegate-tests.factor @@ -2,7 +2,7 @@ USING: delegate kernel arrays tools.test words math definitions compiler.units parser generic prettyprint io.streams.string accessors eval multiline generic.single delegate.protocols delegate.private assocs see make ; -IN: delegate.tests +in: delegate.tests TUPLE: hello this that ; C: hello diff --git a/core/delegate/delegate.factor b/core/delegate/delegate.factor index 8bdb5ebd69..deebe3b78e 100644 --- a/core/delegate/delegate.factor +++ b/core/delegate/delegate.factor @@ -5,7 +5,7 @@ USING: accessors arrays assocs classes.tuple definitions effects generic generic.standard hashtables kernel lexer math parser generic.parser sequences sets slots words words.symbol fry compiler.units make ; -IN: delegate +in: delegate ERROR: broadcast-words-must-have-no-outputs group ; diff --git a/core/delegate/protocols/protocols.factor b/core/delegate/protocols/protocols.factor index aca50d293c..690a707780 100644 --- a/core/delegate/protocols/protocols.factor +++ b/core/delegate/protocols/protocols.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2007 Daniel Ehrenberg ! See http://factorcode.org/license.txt for BSD license. USING: assocs delegate io sequences sequences.private sets ; -IN: delegate.protocols +in: delegate.protocols PROTOCOL: sequence-protocol like new-sequence new-resizable nth nth-unsafe diff --git a/core/destructors/destructors-docs.factor b/core/destructors/destructors-docs.factor index a6ad46ede5..b64c4122a8 100644 --- a/core/destructors/destructors-docs.factor +++ b/core/destructors/destructors-docs.factor @@ -1,5 +1,5 @@ USING: classes help.markup help.syntax io quotations sequences ; -IN: destructors +in: destructors HELP: debug-leaks? { $var-description "When this variable is on, " { $link new-disposable } " stores the current continuation in the " { $link disposable } "'s " { $slot "continuation" } " slot." } diff --git a/core/destructors/destructors-tests.factor b/core/destructors/destructors-tests.factor index 92ddde0e5b..5588968c82 100644 --- a/core/destructors/destructors-tests.factor +++ b/core/destructors/destructors-tests.factor @@ -1,6 +1,6 @@ USING: accessors continuations destructors destructors.private kernel namespaces sequences tools.test ; -IN: destructors.tests +in: destructors.tests TUPLE: dispose-error ; diff --git a/core/destructors/destructors.factor b/core/destructors/destructors.factor index 2196d4f1fb..b1fc37164b 100755 --- a/core/destructors/destructors.factor +++ b/core/destructors/destructors.factor @@ -2,13 +2,13 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors assocs continuations init kernel namespaces sequences sets ; -IN: destructors +in: destructors -SYMBOL: disposables +symbol: disposables ERROR: already-unregistered disposable ; -SYMBOL: debug-leaks? +symbol: debug-leaks? dispose-each ; diff --git a/core/effects/effects-docs.factor b/core/effects/effects-docs.factor index c40ab3ddcc..7ea0e86ab7 100644 --- a/core/effects/effects-docs.factor +++ b/core/effects/effects-docs.factor @@ -1,6 +1,6 @@ USING: arrays classes help.markup help.syntax kernel math sequences strings words ; -IN: effects +in: effects ARTICLE: "effects" "Stack effect declarations" "Word definition words such as " { $link POSTPONE: : } " and " { $link POSTPONE: GENERIC: } " have a " { $emphasis "stack effect declaration" } " as part of their syntax. A stack effect declaration takes the following form:" diff --git a/core/effects/effects-tests.factor b/core/effects/effects-tests.factor index 707396b6ed..013be90ae3 100644 --- a/core/effects/effects-tests.factor +++ b/core/effects/effects-tests.factor @@ -1,6 +1,6 @@ USING: accessors effects effects.parser eval kernel prettyprint sequences tools.test math ; -IN: effects.tests +in: effects.tests { t } [ { "a" } { "a" } { "a" "b" } { "a" "b" } effect<= ] unit-test { f } [ { "a" } { } { "a" "b" } { "a" "b" } effect<= ] unit-test diff --git a/core/effects/effects.factor b/core/effects/effects.factor index 010d4d4d97..931bae430f 100644 --- a/core/effects/effects.factor +++ b/core/effects/effects.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors arrays classes combinators kernel make math math.order math.parser sequences sequences.private strings words ; -IN: effects +in: effects TUPLE: effect { in array read-only } diff --git a/core/effects/parser/parser-docs.factor b/core/effects/parser/parser-docs.factor index 8fb8e1076c..026e766fb2 100644 --- a/core/effects/parser/parser-docs.factor +++ b/core/effects/parser/parser-docs.factor @@ -1,4 +1,4 @@ -IN: effects.parser +in: effects.parser USING: strings effects help.markup help.syntax ; HELP: parse-effect diff --git a/core/effects/parser/parser.factor b/core/effects/parser/parser.factor index 46629023ed..ad458844ef 100644 --- a/core/effects/parser/parser.factor +++ b/core/effects/parser/parser.factor @@ -3,7 +3,7 @@ USING: accessors arrays combinators continuations effects kernel lexer make namespaces parser sequences sets splitting vocabs.parser words ; -IN: effects.parser +in: effects.parser DEFER: parse-effect @@ -12,7 +12,7 @@ ERROR: invalid-row-variable ; ERROR: row-variable-can't-have-type ; ERROR: stack-effect-omits-dashes ; -SYMBOL: effect-var +symbol: effect-var -SINGLETON: math-combination +singleton: math-combination M: math-combination make-default-method drop default-math-method ; diff --git a/core/generic/parser/parser-docs.factor b/core/generic/parser/parser-docs.factor index ef56739f45..84e6c6e7d5 100644 --- a/core/generic/parser/parser-docs.factor +++ b/core/generic/parser/parser-docs.factor @@ -1,5 +1,5 @@ USING: effects generic.single help.markup help.syntax math words ; -IN: generic.parser +in: generic.parser HELP: generic-effect { $values { "word" word } { "effect" effect } } diff --git a/core/generic/parser/parser.factor b/core/generic/parser/parser.factor index 30a463ddbd..7919926a38 100644 --- a/core/generic/parser/parser.factor +++ b/core/generic/parser/parser.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors arrays combinators effects.parser generic kernel namespaces parser quotations sequences words ; -IN: generic.parser +in: generic.parser ERROR: not-in-a-method-error ; @@ -20,7 +20,7 @@ ERROR: not-in-a-method-error ; : scan-new-method ( -- method ) scan-class bootstrap-word scan-word create-method-in ; -SYMBOL: current-method +symbol: current-method : with-method-definition ( method quot -- ) over current-method set call current-method off ; inline diff --git a/core/generic/single/single-docs.factor b/core/generic/single/single-docs.factor index 382337dcbf..54d135f57e 100644 --- a/core/generic/single/single-docs.factor +++ b/core/generic/single/single-docs.factor @@ -1,6 +1,6 @@ USING: effects generic help.markup help.syntax kernel math math.parser sequences ; -IN: generic.single +in: generic.single HELP: no-method { $values { "object" object } { "generic" "a generic word" } } diff --git a/core/generic/single/single.factor b/core/generic/single/single.factor index afa6376983..d276b8eccf 100644 --- a/core/generic/single/single.factor +++ b/core/generic/single/single.factor @@ -4,7 +4,7 @@ USING: accessors arrays assocs classes classes.algebra combinators combinators.private definitions effects generic hashtables kernel layouts make math namespaces quotations sequences words ; -IN: generic.single +in: generic.single alist [ keys sort-classes ] keep extract-keys ; diff --git a/core/generic/standard/standard-docs.factor b/core/generic/standard/standard-docs.factor index 13e4554b5a..c45facff8e 100644 --- a/core/generic/standard/standard-docs.factor +++ b/core/generic/standard/standard-docs.factor @@ -1,5 +1,5 @@ USING: effects generic.single help.markup help.syntax words ; -IN: generic.standard +in: generic.standard HELP: standard-combination { $class-description diff --git a/core/generic/standard/standard-tests.factor b/core/generic/standard/standard-tests.factor index f194ac1959..3262fdd256 100644 --- a/core/generic/standard/standard-tests.factor +++ b/core/generic/standard/standard-tests.factor @@ -6,7 +6,7 @@ math.constants math.functions namespaces parser quotations sequences specialized-vectors strings tools.test words ; QUALIFIED-WITH: alien.c-types c SPECIALIZED-VECTOR: c:double -IN: generic.standard.tests +in: generic.standard.tests GENERIC: class-of ( x -- y ) diff --git a/core/generic/standard/standard.factor b/core/generic/standard/standard.factor index e097b2a552..52c76e87ad 100644 --- a/core/generic/standard/standard.factor +++ b/core/generic/standard/standard.factor @@ -3,7 +3,7 @@ USING: accessors arrays combinators definitions generic generic.single generic.single.private kernel layouts make math namespaces quotations sequences words ; -IN: generic.standard +in: generic.standard ERROR: bad-dispatch-position # ; diff --git a/core/graphs/graphs-docs.factor b/core/graphs/graphs-docs.factor index b358dc85c9..849b96c343 100644 --- a/core/graphs/graphs-docs.factor +++ b/core/graphs/graphs-docs.factor @@ -1,6 +1,6 @@ USING: assocs hashtables hash-sets help.markup help.syntax kernel sequences sets ; -IN: graphs +in: graphs ARTICLE: "graphs" "Directed graph utilities" "Words for treating associative mappings as directed graphs can be found in the " { $vocab-link "graphs" } " vocabulary. A directed graph is represented as an assoc mapping each vertex to a " { $link hash-set } " of edges entering that vertex." diff --git a/core/graphs/graphs.factor b/core/graphs/graphs.factor index 098a704769..7a25dea3e9 100644 --- a/core/graphs/graphs.factor +++ b/core/graphs/graphs.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2006, 2007 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: assocs kernel sequences sets ; -IN: graphs +in: graphs ] unit-test { 0x00010203 } [ B{ 0 1 2 3 } be> ] unit-test diff --git a/core/io/binary/binary.factor b/core/io/binary/binary.factor index d69ddb0d77..da0277f00f 100644 --- a/core/io/binary/binary.factor +++ b/core/io/binary/binary.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2003, 2007 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: kernel math sequences ; -IN: io.binary +in: io.binary : le> ( seq -- x ) 0 [ 8 * shift + ] reduce-index ; diff --git a/core/io/encodings/ascii/ascii-docs.factor b/core/io/encodings/ascii/ascii-docs.factor index 0d7237b1fc..4a90192887 100644 --- a/core/io/encodings/ascii/ascii-docs.factor +++ b/core/io/encodings/ascii/ascii-docs.factor @@ -1,5 +1,5 @@ USING: help.markup help.syntax ; -IN: io.encodings.ascii +in: io.encodings.ascii HELP: ascii { $class-description "ASCII encoding descriptor." } ; diff --git a/core/io/encodings/ascii/ascii.factor b/core/io/encodings/ascii/ascii.factor index ddb0818c82..73fe66b852 100644 --- a/core/io/encodings/ascii/ascii.factor +++ b/core/io/encodings/ascii/ascii.factor @@ -2,9 +2,9 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors byte-arrays io io.encodings io.encodings.private kernel math sequences strings ; -IN: io.encodings.ascii +in: io.encodings.ascii -SINGLETON: ascii +singleton: ascii M: ascii encode-char drop diff --git a/core/io/encodings/encodings-docs.factor b/core/io/encodings/encodings-docs.factor index ddcf2f37fb..0ca95207a3 100644 --- a/core/io/encodings/encodings-docs.factor +++ b/core/io/encodings/encodings-docs.factor @@ -1,5 +1,5 @@ USING: help.markup help.syntax io quotations math sequences strings ; -IN: io.encodings +in: io.encodings HELP: { $values { "stream" "an output stream" } diff --git a/core/io/encodings/encodings-tests.factor b/core/io/encodings/encodings-tests.factor index c0807d1bff..d370f0822c 100644 --- a/core/io/encodings/encodings-tests.factor +++ b/core/io/encodings/encodings-tests.factor @@ -2,7 +2,7 @@ USING: accessors io io.encodings io.encodings.ascii io.encodings.string io.encodings.utf8 io.files io.streams.byte-array io.streams.string kernel namespaces tools.test ; -IN: io.encodings.tests +in: io.encodings.tests { { } } [ "vocab:io/test/empty-file.txt" ascii file-lines ] diff --git a/core/io/encodings/encodings.factor b/core/io/encodings/encodings.factor index 054fa5915f..d538ada19f 100644 --- a/core/io/encodings/encodings.factor +++ b/core/io/encodings/encodings.factor @@ -3,7 +3,7 @@ USING: accessors byte-arrays combinators destructors io io.streams.plain kernel kernel.private math namespaces sbufs sequences sequences.private splitting strings strings.private ; -IN: io.encodings +in: io.encodings ! The encoding descriptor protocol diff --git a/core/io/encodings/utf16/utf16-docs.factor b/core/io/encodings/utf16/utf16-docs.factor index 4e8e778edf..d1c05729f0 100644 --- a/core/io/encodings/utf16/utf16-docs.factor +++ b/core/io/encodings/utf16/utf16-docs.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2008 Daniel Ehrenberg ! See http://factorcode.org/license.txt for BSD license. USING: help.markup help.syntax io.encodings strings ; -IN: io.encodings.utf16 +in: io.encodings.utf16 ARTICLE: "io.encodings.utf16" "UTF-16 encoding" "The UTF-16 encoding is a variable-width encoding. Unicode code points are encoded as 2 or 4 byte sequences. There are three encoding descriptor classes for working with UTF-16, depending on endianness or the presence of a BOM:" diff --git a/core/io/encodings/utf16/utf16.factor b/core/io/encodings/utf16/utf16.factor index 5eba481bd3..0e1feea76f 100644 --- a/core/io/encodings/utf16/utf16.factor +++ b/core/io/encodings/utf16/utf16.factor @@ -4,13 +4,13 @@ USING: accessors byte-arrays combinators io io.binary io.encodings kernel math math.private namespaces sbufs sequences sequences.private splitting strings strings.private vectors ; -IN: io.encodings.utf16 +in: io.encodings.utf16 -SINGLETON: utf16be +singleton: utf16be -SINGLETON: utf16le +singleton: utf16le -SINGLETON: utf16 +singleton: utf16 ERROR: missing-bom ; diff --git a/core/io/encodings/utf16n/utf16n-docs.factor b/core/io/encodings/utf16n/utf16n-docs.factor index 9ccf4834d4..f565672878 100644 --- a/core/io/encodings/utf16n/utf16n-docs.factor +++ b/core/io/encodings/utf16n/utf16n-docs.factor @@ -1,5 +1,5 @@ USING: help.markup help.syntax ; -IN: io.encodings.utf16n +in: io.encodings.utf16n HELP: utf16n { $class-description "The encoding descriptor for UTF-16 without a byte order mark in native endian order. This is useful mostly for FFI calls which take input of strings of the type wchar_t*" } diff --git a/core/io/encodings/utf16n/utf16n-tests.factor b/core/io/encodings/utf16n/utf16n-tests.factor index c76e090ae9..4f0c963f5c 100644 --- a/core/io/encodings/utf16n/utf16n-tests.factor +++ b/core/io/encodings/utf16n/utf16n-tests.factor @@ -1,6 +1,6 @@ USING: accessors alien.data io.encodings.utf16 io.encodings.utf16n io.streams.byte-array kernel tools.test ; -IN: io.encodings.utf16n.tests +in: io.encodings.utf16n.tests : correct-endian ( obj -- ? ) code>> little-endian? [ utf16le = ] [ utf16be = ] if ; diff --git a/core/io/encodings/utf16n/utf16n.factor b/core/io/encodings/utf16n/utf16n.factor index 6e178c1774..81471b4380 100644 --- a/core/io/encodings/utf16n/utf16n.factor +++ b/core/io/encodings/utf16n/utf16n.factor @@ -1,11 +1,11 @@ ! Copyright (C) 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: io.encodings io.encodings.utf16 kernel alien.accessors ; -IN: io.encodings.utf16n +in: io.encodings.utf16n ! Native-order UTF-16 -SINGLETON: utf16n +singleton: utf16n : choose-utf16-endian ( -- descriptor ) B{ 1 0 0 0 } 0 alien-unsigned-4 1 = utf16le utf16be ? ; foldable diff --git a/core/io/encodings/utf8/utf8-docs.factor b/core/io/encodings/utf8/utf8-docs.factor index ad996b67af..1f499df12e 100644 --- a/core/io/encodings/utf8/utf8-docs.factor +++ b/core/io/encodings/utf8/utf8-docs.factor @@ -1,5 +1,5 @@ USING: help.markup help.syntax ; -IN: io.encodings.utf8 +in: io.encodings.utf8 HELP: utf8 { $class-description "Encoding descriptor for UTF-8 encoding." } ; diff --git a/core/io/encodings/utf8/utf8-tests.factor b/core/io/encodings/utf8/utf8-tests.factor index efeeb708d0..b26fad7f2a 100644 --- a/core/io/encodings/utf8/utf8-tests.factor +++ b/core/io/encodings/utf8/utf8-tests.factor @@ -1,6 +1,6 @@ USING: arrays io.encodings.string io.encodings.utf8 kernel sequences strings tools.test ; -IN: io.encodings.utf8.tests +in: io.encodings.utf8.tests : decode-utf8-w/stream ( array -- newarray ) utf8 decode >array ; diff --git a/core/io/encodings/utf8/utf8.factor b/core/io/encodings/utf8/utf8.factor index 4979daad15..5c068a47fd 100644 --- a/core/io/encodings/utf8/utf8.factor +++ b/core/io/encodings/utf8/utf8.factor @@ -2,11 +2,11 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors combinators io io.encodings io.encodings.private kernel math math.order sequences strings ; -IN: io.encodings.utf8 +in: io.encodings.utf8 ! Decoding UTF-8 -SINGLETON: utf8 +singleton: utf8 specialized-array-vocab ; -IN: io.files.tests +in: io.files.tests SPECIALIZED-ARRAY: int diff --git a/core/io/files/files.factor b/core/io/files/files.factor index f2a212a403..95fdf520b7 100644 --- a/core/io/files/files.factor +++ b/core/io/files/files.factor @@ -3,15 +3,15 @@ USING: alien.strings continuations init io io.backend io.encodings io.encodings.utf8 io.files.private io.pathnames kernel kernel.private namespaces sequences splitting system ; -IN: io.files +in: io.files -SYMBOL: +retry+ ! just try the operation again without blocking -SYMBOL: +input+ -SYMBOL: +output+ +symbol: +retry+ ! just try the operation again without blocking +symbol: +input+ +symbol: +output+ ! Returns an event to wait for which will ensure completion of ! this request diff --git a/core/io/io-docs.factor b/core/io/io-docs.factor index a8fd0016d5..1b2e88b6b8 100644 --- a/core/io/io-docs.factor +++ b/core/io/io-docs.factor @@ -1,7 +1,7 @@ USING: help.markup help.syntax quotations hashtables kernel classes strings continuations destructors math byte-arrays alien specialized-arrays sequences ; -IN: io +in: io ARTICLE: "stream-types" "Binary and text streams" "A word which outputs the stream element type:" diff --git a/core/io/io-tests.factor b/core/io/io-tests.factor index 98a43975a3..a2275efa20 100644 --- a/core/io/io-tests.factor +++ b/core/io/io-tests.factor @@ -1,6 +1,6 @@ USING: accessors io io.streams.string kernel math namespaces parser sbufs sequences strings tools.test words ; -IN: io.tests +in: io.tests { f } [ "vocab:io/test/no-trailing-eol.factor" run-file diff --git a/core/io/io.factor b/core/io/io.factor index fc804f0680..d0ae35393a 100644 --- a/core/io/io.factor +++ b/core/io/io.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: destructors kernel kernel.private math namespaces sequences sequences.private ; -IN: io +in: io SYMBOLS: +byte+ +character+ ; @@ -36,7 +36,7 @@ GENERIC: stream-length ( stream -- n/f ) ! Default streams MIXIN: input-stream MIXIN: output-stream -SYMBOL: error-stream +symbol: error-stream : readln ( -- str/f ) input-stream get stream-readln ; inline : read1 ( -- elt ) input-stream get stream-read1 ; inline diff --git a/core/io/pathnames/pathnames-docs.factor b/core/io/pathnames/pathnames-docs.factor index 8f94200d15..d407c2737a 100644 --- a/core/io/pathnames/pathnames-docs.factor +++ b/core/io/pathnames/pathnames-docs.factor @@ -1,6 +1,6 @@ USING: help.markup help.syntax io.backend io.directories io.files io.pathnames.private kernel sequences strings system ; -IN: io.pathnames +in: io.pathnames HELP: path-separator? { $values { "ch" "a code point" } { "?" boolean } } diff --git a/core/io/pathnames/pathnames.factor b/core/io/pathnames/pathnames.factor index 2d382e49d1..38b401c1f1 100644 --- a/core/io/pathnames/pathnames.factor +++ b/core/io/pathnames/pathnames.factor @@ -2,9 +2,9 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors combinators io.backend kernel math math.order namespaces sequences splitting strings system ; -IN: io.pathnames +in: io.pathnames -SYMBOL: current-directory +symbol: current-directory : path-separator? ( ch -- ? ) os windows? "/\\" "/" ? member? ; diff --git a/core/io/streams/byte-array/byte-array-docs.factor b/core/io/streams/byte-array/byte-array-docs.factor index eeada8d0c9..19655cfe1e 100644 --- a/core/io/streams/byte-array/byte-array-docs.factor +++ b/core/io/streams/byte-array/byte-array-docs.factor @@ -1,5 +1,5 @@ USING: help.syntax help.markup io byte-arrays quotations ; -IN: io.streams.byte-array +in: io.streams.byte-array ABOUT: "io.streams.byte-array" diff --git a/core/io/streams/byte-array/byte-array-tests.factor b/core/io/streams/byte-array/byte-array-tests.factor index 8f0bb63a75..68a05993d2 100644 --- a/core/io/streams/byte-array/byte-array-tests.factor +++ b/core/io/streams/byte-array/byte-array-tests.factor @@ -1,7 +1,7 @@ USING: alien.c-types alien.data arrays io io.encodings.ascii io.encodings.binary io.encodings.utf8 io.streams.byte-array kernel math specialized-arrays strings tools.test ; -IN: io.streams.byte-array.tests +in: io.streams.byte-array.tests SPECIALIZED-ARRAY: int { B{ } } [ B{ } binary [ contents ] with-byte-reader ] unit-test diff --git a/core/io/streams/byte-array/byte-array.factor b/core/io/streams/byte-array/byte-array.factor index d4523838ee..50fb9a8d4b 100644 --- a/core/io/streams/byte-array/byte-array.factor +++ b/core/io/streams/byte-array/byte-array.factor @@ -3,7 +3,7 @@ USING: accessors byte-arrays byte-vectors destructors io io.encodings io.streams.sequence kernel math namespaces sequences sequences.private ; -IN: io.streams.byte-array +in: io.streams.byte-array INSTANCE: byte-vector output-stream M: byte-vector stream-element-type drop +byte+ ; inline diff --git a/core/io/streams/c/c-docs.factor b/core/io/streams/c/c-docs.factor index 1cb286dc87..443f99b1d7 100644 --- a/core/io/streams/c/c-docs.factor +++ b/core/io/streams/c/c-docs.factor @@ -1,6 +1,6 @@ USING: help.markup help.syntax io io.files threads strings byte-arrays io.streams.plain alien math ; -IN: io.streams.c +in: io.streams.c ARTICLE: "io.streams.c" "ANSI C streams" "C streams are found in the " { $vocab-link "io.streams.c" } " vocabulary; they are " { $link "stream-protocol" } " implementations which read and write C " { $snippet "FILE*" } " handles." diff --git a/core/io/streams/c/c.factor b/core/io/streams/c/c.factor index 8dc14ef55f..eba196b0c6 100644 --- a/core/io/streams/c/c.factor +++ b/core/io/streams/c/c.factor @@ -3,7 +3,7 @@ USING: accessors alien alien.strings byte-arrays byte-vectors destructors io io.backend io.encodings.utf8 io.files kernel kernel.private math sequences threads.private ; -IN: io.streams.c +in: io.streams.c PRIMITIVE: (fopen) ( path mode -- alien ) PRIMITIVE: fclose ( alien -- ) diff --git a/core/io/streams/memory/memory-tests.factor b/core/io/streams/memory/memory-tests.factor index d6810084e3..cde636aac2 100644 --- a/core/io/streams/memory/memory-tests.factor +++ b/core/io/streams/memory/memory-tests.factor @@ -1,7 +1,7 @@ ! (c)2011 Joe Groff bsd license USING: alien.data destructors io io.streams.memory kernel libc tools.test ; -IN: io.streams.memory.tests +in: io.streams.memory.tests { 1 2 3 } [ B{ 1 2 3 } diff --git a/core/io/streams/memory/memory.factor b/core/io/streams/memory/memory.factor index 88e2ccfafb..2e1d8dd3dc 100644 --- a/core/io/streams/memory/memory.factor +++ b/core/io/streams/memory/memory.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: accessors alien alien.accessors io kernel ; -IN: io.streams.memory +in: io.streams.memory TUPLE: memory-stream alien ; diff --git a/core/io/streams/plain/plain-docs.factor b/core/io/streams/plain/plain-docs.factor index 4ebdc20216..206bf765fd 100644 --- a/core/io/streams/plain/plain-docs.factor +++ b/core/io/streams/plain/plain-docs.factor @@ -1,5 +1,5 @@ USING: help.markup help.syntax io ; -IN: io.streams.plain +in: io.streams.plain ABOUT: "io.streams.plain" diff --git a/core/io/streams/plain/plain.factor b/core/io/streams/plain/plain.factor index 4ea1996f88..5dc3c7db45 100644 --- a/core/io/streams/plain/plain.factor +++ b/core/io/streams/plain/plain.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2005, 2009 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: kernel io ; -IN: io.streams.plain +in: io.streams.plain MIXIN: plain-writer diff --git a/core/io/streams/sequence/sequence.factor b/core/io/streams/sequence/sequence.factor index 8760299b33..af371f16e7 100644 --- a/core/io/streams/sequence/sequence.factor +++ b/core/io/streams/sequence/sequence.factor @@ -3,7 +3,7 @@ USING: accessors byte-arrays combinators destructors growable io io.private io.streams.plain kernel math math.order sequences sequences.private strings ; -IN: io.streams.sequence +in: io.streams.sequence ! Readers SLOT: underlying diff --git a/core/io/streams/string/string-docs.factor b/core/io/streams/string/string-docs.factor index 59a167b72f..49ba8daa38 100644 --- a/core/io/streams/string/string-docs.factor +++ b/core/io/streams/string/string-docs.factor @@ -1,5 +1,5 @@ USING: help.markup help.syntax io strings quotations sequences ; -IN: io.streams.string +in: io.streams.string ARTICLE: "io.streams.string" "String streams" "String streams:" diff --git a/core/io/streams/string/string-tests.factor b/core/io/streams/string/string-tests.factor index 0385e89670..17e00d7387 100644 --- a/core/io/streams/string/string-tests.factor +++ b/core/io/streams/string/string-tests.factor @@ -1,6 +1,6 @@ USING: io.streams.string io kernel arrays namespaces make tools.test ; -IN: io.streams.string.tests +in: io.streams.string.tests { "" } [ "" [ contents ] with-string-reader ] unit-test diff --git a/core/io/streams/string/string.factor b/core/io/streams/string/string.factor index bb16e7ec81..ed015b4246 100644 --- a/core/io/streams/string/string.factor +++ b/core/io/streams/string/string.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors destructors io io.encodings io.streams.sequence kernel math sbufs sequences sequences.private strings ; -IN: io.streams.string +in: io.streams.string ! Readers TUPLE: string-reader { underlying string read-only } { i array-capacity } ; diff --git a/core/io/test/no-trailing-eol.factor b/core/io/test/no-trailing-eol.factor index e6ac5760aa..64b52bb19c 100644 --- a/core/io/test/no-trailing-eol.factor +++ b/core/io/test/no-trailing-eol.factor @@ -1,4 +1,4 @@ -IN: io.tests -USE: math +in: io.tests +use: math : foo ( -- x ) 2 2 + ; -FORGET: foo \ No newline at end of file +FORGET: foo diff --git a/core/kernel/kernel-docs.factor b/core/kernel/kernel-docs.factor index facf08e513..e32e98d503 100644 --- a/core/kernel/kernel-docs.factor +++ b/core/kernel/kernel-docs.factor @@ -1,6 +1,6 @@ USING: alien arrays classes combinators help.markup help.syntax kernel.private layouts math quotations system words ; -IN: kernel +in: kernel HELP: JIT-PUSH-LITERAL { $description "JIT code template for pushing literals unto the datastack." } ; diff --git a/core/kernel/kernel-tests.factor b/core/kernel/kernel-tests.factor index bbbe94adc0..d3aacdfbf0 100644 --- a/core/kernel/kernel-tests.factor +++ b/core/kernel/kernel-tests.factor @@ -2,7 +2,7 @@ USING: accessors alien alien.accessors arrays assocs byte-arrays continuations debugger grouping io.streams.string kernel kernel.private literals locals.backend math memory namespaces prettyprint sequences sequences.private tools.test words ; -IN: kernel.tests +in: kernel.tests { 0 } [ f size ] unit-test { t } [ [ \ = \ = ] all-equal? ] unit-test diff --git a/core/kernel/kernel.factor b/core/kernel/kernel.factor index c685dcbed0..95637739dc 100644 --- a/core/kernel/kernel.factor +++ b/core/kernel/kernel.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2004, 2009 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: kernel.private slots.private math.private ; -IN: kernel +in: kernel BUILTIN: callstack ; BUILTIN: tuple ; diff --git a/core/layouts/layouts-docs.factor b/core/layouts/layouts-docs.factor index 4d6d3e6e31..9efebfebfc 100644 --- a/core/layouts/layouts-docs.factor +++ b/core/layouts/layouts-docs.factor @@ -1,7 +1,7 @@ USING: generic help.markup help.syntax kernel math memory namespaces sequences kernel.private classes classes.builtin sequences.private ; -IN: layouts +in: layouts HELP: tag-bits { $var-description "Number of least significant bits reserved for a type tag in a tagged pointer." } diff --git a/core/layouts/layouts.factor b/core/layouts/layouts.factor index 2c5c91f6ef..c0879f3002 100644 --- a/core/layouts/layouts.factor +++ b/core/layouts/layouts.factor @@ -1,21 +1,21 @@ ! Copyright (C) 2007, 2009 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: assocs kernel kernel.private math math.order namespaces ; -IN: layouts +in: layouts -SYMBOL: data-alignment +symbol: data-alignment -SYMBOL: tag-mask +symbol: tag-mask -SYMBOL: tag-bits +symbol: tag-bits -SYMBOL: num-types +symbol: num-types -SYMBOL: type-numbers +symbol: type-numbers -SYMBOL: mega-cache-size +symbol: mega-cache-size -SYMBOL: header-bits +symbol: header-bits : type-number ( class -- n ) type-numbers get at ; diff --git a/core/lexer/lexer-docs.factor b/core/lexer/lexer-docs.factor index 951fb72335..b00fc7b088 100644 --- a/core/lexer/lexer-docs.factor +++ b/core/lexer/lexer-docs.factor @@ -1,6 +1,6 @@ USING: help.markup help.syntax kernel math sequences strings words quotations ; -IN: lexer +in: lexer HELP: lexer { $var-description "Stores the current " { $link lexer } " instance." } diff --git a/core/lexer/lexer.factor b/core/lexer/lexer.factor index 2e23e7352b..169db3a2ad 100644 --- a/core/lexer/lexer.factor +++ b/core/lexer/lexer.factor @@ -3,7 +3,7 @@ USING: accessors arrays combinators continuations io kernel kernel.private math math.parser namespaces sequences sequences.private source-files.errors strings vectors ; -IN: lexer +in: lexer TUPLE: lexer { text array } diff --git a/core/locals/backend/backend-tests.factor b/core/locals/backend/backend-tests.factor index 9c6e6d8d66..c08f62692c 100644 --- a/core/locals/backend/backend-tests.factor +++ b/core/locals/backend/backend-tests.factor @@ -1,4 +1,4 @@ -IN: locals.backend.tests +in: locals.backend.tests USING: tools.test locals.backend kernel arrays accessors ; : get-local-test-1 ( -- x ) 3 1 load-locals 0 get-local 1 drop-locals ; diff --git a/core/locals/backend/backend.factor b/core/locals/backend/backend.factor index 5f0cf9963f..a36893b1b7 100644 --- a/core/locals/backend/backend.factor +++ b/core/locals/backend/backend.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: slots.private ; -IN: locals.backend +in: locals.backend PRIMITIVE: drop-locals ( n -- ) PRIMITIVE: get-local ( n -- obj ) diff --git a/core/locals/definitions/definitions.factor b/core/locals/definitions/definitions.factor index 5a91a11cf3..589acc27a5 100644 --- a/core/locals/definitions/definitions.factor +++ b/core/locals/definitions/definitions.factor @@ -3,7 +3,7 @@ USING: accessors definitions effects generic kernel locals macros memoize words locals.types sequences make quotations ; -IN: locals.definitions +in: locals.definitions PREDICATE: lambda-word < word "lambda" word-prop >boolean ; diff --git a/core/locals/errors/errors.factor b/core/locals/errors/errors.factor index d8a53b3c4e..b4441ccaaf 100644 --- a/core/locals/errors/errors.factor +++ b/core/locals/errors/errors.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2007, 2008 Slava Pestov, Eduardo Cavazos. ! See http://factorcode.org/license.txt for BSD license. USING: kernel summary ; -IN: locals.errors +in: locals.errors ERROR: >r/r>-in-lambda-error ; diff --git a/core/locals/fry/fry.factor b/core/locals/fry/fry.factor index a2a1a6c178..69701942a3 100644 --- a/core/locals/fry/fry.factor +++ b/core/locals/fry/fry.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors fry fry.private generalizations kernel locals.types sequences ; -IN: locals.fry +in: locals.fry ! Support for mixing locals with fry diff --git a/core/locals/locals-docs.factor b/core/locals/locals-docs.factor index 0ddccd58cc..baadcb2424 100644 --- a/core/locals/locals-docs.factor +++ b/core/locals/locals-docs.factor @@ -1,6 +1,6 @@ USING: help.syntax help.markup kernel macros prettyprint memoize combinators arrays generalizations see ; -IN: locals +in: locals HELP: [| { $syntax "[| bindings... | body... ]" } @@ -70,7 +70,7 @@ ARTICLE: "locals-examples" "Examples of lexical variables" { $heading "Definitions with lexical variables" } "The following example demonstrates lexical variable bindings in word definitions. The " { $snippet "quadratic-roots" } " word is defined with " { $link POSTPONE: :: } ", so it takes its inputs from the top three elements of the datastack and binds them to the variables " { $snippet "a" } ", " { $snippet "b" } ", and " { $snippet "c" } ". In the body, the " { $snippet "disc" } " variable is bound using " { $link POSTPONE: :> } " and then used in the following line of code." { $example "USING: locals math math.functions kernel ; -IN: scratchpad +in: scratchpad :: quadratic-roots ( a b c -- x y ) b sq 4 a c * * - sqrt :> disc b neg disc [ + ] [ - ] 2bi [ 2 a * / ] bi@ ; @@ -80,7 +80,7 @@ IN: scratchpad } "If you wanted to perform the quadratic formula interactively from the listener, you could use " { $link POSTPONE: [let } " to provide a scope for the variables:" { $example "USING: locals math math.functions kernel ; -IN: scratchpad +in: scratchpad [let 1.0 :> a 1.0 :> b -6.0 :> c b sq 4 a c * * - sqrt :> disc b neg disc [ + ] [ - ] 2bi [ 2 a * / ] bi@ @@ -115,7 +115,7 @@ $nl "This next example demonstrates closures and mutable variable bindings. The " { $snippet "" } " word outputs a tuple containing a pair of quotations that respectively increment and decrement an internal counter in the mutable " { $snippet "value" } " variable and then return the new value. The quotations close over the counter, so each invocation of the word gives new quotations with a new internal counter." { $example "USING: locals kernel math ; -IN: scratchpad +in: scratchpad TUPLE: counter adder subtractor ; @@ -136,7 +136,7 @@ TUPLE: counter adder subtractor ; "The same variable name can be bound multiple times in the same scope. This is different from reassigning the value of a mutable variable. The most recent binding for a variable name will mask previous bindings for that name. However, the old binding referring to the previous value can still persist in closures. The following contrived example demonstrates this:" { $example "USING: kernel locals prettyprint ; -IN: scratchpad +in: scratchpad :: rebinding-example ( -- quot1 quot2 ) 5 :> a [ a ] 6 :> a [ a ] ; @@ -155,7 +155,7 @@ mutable-example [ call . ] bi@" "Some kinds of literals can include references to lexical variables as described in " { $link "locals-literals" } ". For example, the " { $link 3array } " word could be implemented as follows:" { $example "USING: locals prettyprint ; -IN: scratchpad +in: scratchpad :: my-3array ( x y z -- array ) { x y z } ; 1 \"two\" 3.0 my-3array ." diff --git a/core/locals/locals-tests.factor b/core/locals/locals-tests.factor index 82da44a4b0..2563259d36 100644 --- a/core/locals/locals-tests.factor +++ b/core/locals/locals-tests.factor @@ -4,7 +4,7 @@ accessors generic eval combinators combinators.short-circuit combinators.short-circuit.smart math.order math.functions definitions compiler.units fry lexer words.symbol see multiline combinators.smart ; -IN: locals.tests +in: locals.tests :: foo ( a b -- a a ) a a ; diff --git a/core/locals/locals.factor b/core/locals/locals.factor index 56c40a5008..3a45919b2e 100644 --- a/core/locals/locals.factor +++ b/core/locals/locals.factor @@ -3,6 +3,6 @@ USING: lexer macros memoize parser sequences vocabs vocabs.loader words kernel namespaces locals.parser locals.types locals.errors ; -IN: locals +in: locals ! Empty on purpose for now. diff --git a/core/locals/macros/macros.factor b/core/locals/macros/macros.factor index 1f9525e5eb..e3dec2962a 100644 --- a/core/locals/macros/macros.factor +++ b/core/locals/macros/macros.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2007, 2009 Slava Pestov, Eduardo Cavazos. ! See http://factorcode.org/license.txt for BSD license. USING: accessors assocs kernel locals.types macros.expander fry ; -IN: locals.macros +in: locals.macros M: lambda expand-macros clone [ expand-macros ] change-body ; diff --git a/core/locals/parser/parser-docs.factor b/core/locals/parser/parser-docs.factor index 9884ae0790..9e3e70c8dc 100644 --- a/core/locals/parser/parser-docs.factor +++ b/core/locals/parser/parser-docs.factor @@ -1,6 +1,6 @@ USING: help.markup help.syntax locals locals.types quotations strings vocabs.parser ; -IN: locals.parser +in: locals.parser HELP: in-lambda? { $var-description { $link t } " if we're currently parsing a lambda with lexical variables." } ; diff --git a/core/locals/parser/parser-tests.factor b/core/locals/parser/parser-tests.factor index 50ba01c4a3..86a5b9464a 100644 --- a/core/locals/parser/parser-tests.factor +++ b/core/locals/parser/parser-tests.factor @@ -1,7 +1,7 @@ USING: accessors assocs compiler.units kernel lexer locals.backend locals.parser namespaces parser prettyprint sequences sorting tools.test vocabs vocabs.parser ; -IN: locals.parser.tests +in: locals.parser.tests ! XXX: remove the << and >> below and make test-all pass diff --git a/core/locals/parser/parser.factor b/core/locals/parser/parser.factor index fc2274706a..7a5be9b4e7 100644 --- a/core/locals/parser/parser.factor +++ b/core/locals/parser/parser.factor @@ -4,9 +4,9 @@ USING: accessors arrays assocs combinators continuations effects.parser fry generic.parser kernel lexer locals.errors locals.rewrite.closures locals.types make namespaces parser quotations sequences splitting vocabs.parser words ; -IN: locals.parser +in: locals.parser -SYMBOL: in-lambda? +symbol: in-lambda? : ?rewrite-closures ( form -- form' ) in-lambda? get [ 1array ] [ rewrite-closures ] if ; @@ -29,7 +29,7 @@ ERROR: invalid-local-name name ; : parse-local-defs ( -- words assoc ) "|" parse-tokens make-locals ; -SINGLETON: lambda-parser +singleton: lambda-parser : with-lambda-scope ( assoc reader-quot: ( -- quot ) -- quot ) '[ diff --git a/core/locals/rewrite/closures/closures.factor b/core/locals/rewrite/closures/closures.factor index cb17b3be62..ce8f89f3fe 100644 --- a/core/locals/rewrite/closures/closures.factor +++ b/core/locals/rewrite/closures/closures.factor @@ -3,7 +3,7 @@ USING: accessors kernel locals.rewrite.point-free locals.rewrite.sugar locals.types macros.expander make quotations sequences sets words ; -IN: locals.rewrite.closures +in: locals.rewrite.closures ! Step 2: identify free variables and make them into explicit ! parameters of lambdas which are curried on diff --git a/core/locals/rewrite/point-free/point-free.factor b/core/locals/rewrite/point-free/point-free.factor index 283a3bbd5a..c8c84b32bc 100644 --- a/core/locals/rewrite/point-free/point-free.factor +++ b/core/locals/rewrite/point-free/point-free.factor @@ -3,7 +3,7 @@ USING: accessors arrays fry kernel math quotations sequences words combinators make locals.backend locals.types locals.errors ; -IN: locals.rewrite.point-free +in: locals.rewrite.point-free ! Step 3: rewrite locals usage within a single quotation into ! retain stack manipulation diff --git a/core/locals/rewrite/sugar/sugar.factor b/core/locals/rewrite/sugar/sugar.factor index 6689f959e7..75bb5458ae 100644 --- a/core/locals/rewrite/sugar/sugar.factor +++ b/core/locals/rewrite/sugar/sugar.factor @@ -4,7 +4,7 @@ USING: accessors arrays assocs classes classes.tuple fry sequences.generalizations hashtables kernel locals locals.backend locals.errors locals.types make quotations sequences vectors words ; -IN: locals.rewrite.sugar +in: locals.rewrite.sugar ! Step 1: rewrite [| into :> forms, turn ! literals with locals in them into code which constructs diff --git a/core/locals/types/types-tests.factor b/core/locals/types/types-tests.factor index 91db776b4b..8ec7961394 100644 --- a/core/locals/types/types-tests.factor +++ b/core/locals/types/types-tests.factor @@ -1,5 +1,5 @@ USING: accessors compiler.units kernel locals.types tools.test words ; -IN: locals.types.test +in: locals.types.test { t } [ [ "hello" ] with-compilation-unit "local?" word-prop diff --git a/core/locals/types/types.factor b/core/locals/types/types.factor index 1c2c27a067..57f78b4049 100644 --- a/core/locals/types/types.factor +++ b/core/locals/types/types.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors combinators kernel sequences words quotations ; -IN: locals.types +in: locals.types TUPLE: lambda vars body ; diff --git a/core/macros/expander/expander-tests.factor b/core/macros/expander/expander-tests.factor index 0d5a6b67c4..b7fa635989 100644 --- a/core/macros/expander/expander-tests.factor +++ b/core/macros/expander/expander-tests.factor @@ -1,4 +1,4 @@ -IN: macros.expander.tests +in: macros.expander.tests USING: macros.expander tools.test math combinators.short-circuit kernel combinators ; diff --git a/core/macros/expander/expander.factor b/core/macros/expander/expander.factor index 73d8765735..42eca5761f 100644 --- a/core/macros/expander/expander.factor +++ b/core/macros/expander/expander.factor @@ -4,11 +4,11 @@ USING: accessors arrays combinators combinators.short-circuit continuations effects fry generalizations kernel make math namespaces quotations sequences sequences.private vectors words ; -IN: macros.expander +in: macros.expander GENERIC: expand-macros ( quot -- quot' ) -SYMBOL: stack +symbol: stack : begin ( -- ) V{ } clone stack set ; diff --git a/core/macros/macros-docs.factor b/core/macros/macros-docs.factor index 8bc58fb2ef..b50f5c5cbe 100644 --- a/core/macros/macros-docs.factor +++ b/core/macros/macros-docs.factor @@ -1,6 +1,6 @@ USING: help.markup help.syntax quotations kernel stack-checker.transforms sequences combinators ; -IN: macros +in: macros HELP: MACRO: { $syntax "MACRO: word ( inputs... -- quot ) definition... ;" } diff --git a/core/macros/macros-tests.factor b/core/macros/macros-tests.factor index f02ea299f7..1ebd5913b1 100644 --- a/core/macros/macros-tests.factor +++ b/core/macros/macros-tests.factor @@ -1,7 +1,7 @@ USING: tools.test macros math kernel arrays vectors io.streams.string prettyprint parser eval see stack-checker compiler.units definitions vocabs ; -IN: macros.tests +in: macros.tests MACRO: see-test ( a b -- quot ) + ; diff --git a/core/macros/macros.factor b/core/macros/macros.factor index 2d0424415c..c378c6c782 100644 --- a/core/macros/macros.factor +++ b/core/macros/macros.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors combinators compiler.units definitions effects effects.parser fry kernel memoize words ; -IN: macros +in: macros { $values { "obj1" object } { "obj2" object } { "<=>" "an ordering specifier" } } diff --git a/core/math/order/order.factor b/core/math/order/order.factor index e26260bc8d..12c3422793 100644 --- a/core/math/order/order.factor +++ b/core/math/order/order.factor @@ -1,11 +1,11 @@ ! Copyright (C) 2008, 2010 Slava Pestov, Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. USING: kernel kernel.private math ; -IN: math.order +in: math.order -SYMBOL: +lt+ -SYMBOL: +eq+ -SYMBOL: +gt+ +symbol: +lt+ +symbol: +eq+ +symbol: +gt+ : invert-comparison ( <=> -- >=< ) ! Can't use case, index or nth here diff --git a/core/math/parser/parser-docs.factor b/core/math/parser/parser-docs.factor index 211a2f7f94..d2dffffe94 100644 --- a/core/math/parser/parser-docs.factor +++ b/core/math/parser/parser-docs.factor @@ -2,7 +2,7 @@ USING: byte-arrays help.markup help.syntax math math.parser.private prettyprint namespaces make sequences strings ; -IN: math.parser +in: math.parser ARTICLE: "number-strings" "Converting between numbers and strings" "These words only convert between real numbers and strings. Complex numbers are constructed by the parser (" { $link "parser" } ") and printed by the prettyprinter (" { $link "prettyprint" } ")." diff --git a/core/math/parser/parser.factor b/core/math/parser/parser.factor index 63c09ba8d3..fd3c432a08 100644 --- a/core/math/parser/parser.factor +++ b/core/math/parser/parser.factor @@ -3,7 +3,7 @@ USING: accessors byte-arrays combinators kernel kernel.private layouts make math math.private sbufs sequences sequences.private strings strings.private ; -IN: math.parser +in: math.parser array ] unit-test { { } } [ 1 1 (a,b] >array ] unit-test diff --git a/core/math/ranges/ranges.factor b/core/math/ranges/ranges.factor index 5511756092..85282200f7 100644 --- a/core/math/ranges/ranges.factor +++ b/core/math/ranges/ranges.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors classes.tuple kernel math math.order sequences sequences.private ; -IN: math.ranges +in: math.ranges TUPLE: range { from read-only } diff --git a/core/math/ratios/ratios-docs.factor b/core/math/ratios/ratios-docs.factor index 57b37f1bb7..3d5c1b7818 100644 --- a/core/math/ratios/ratios-docs.factor +++ b/core/math/ratios/ratios-docs.factor @@ -1,6 +1,6 @@ USING: help.markup help.syntax math math.private math.ratios.private math.functions ; -IN: math.ratios +in: math.ratios ARTICLE: "rationals" "Rational numbers" { $subsections ratio } diff --git a/core/math/ratios/ratios.factor b/core/math/ratios/ratios.factor index 669f1c990f..f749e427e7 100644 --- a/core/math/ratios/ratios.factor +++ b/core/math/ratios/ratios.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2004, 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: accessors kernel math ; -IN: math.ratios +in: math.ratios : 2>fraction ( a/b c/d -- a c b d ) [ >fraction ] bi@ swapd ; inline diff --git a/core/memoize/memoize-docs.factor b/core/memoize/memoize-docs.factor index f147e3c7c4..0eae5b6212 100644 --- a/core/memoize/memoize-docs.factor +++ b/core/memoize/memoize-docs.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2007, 2009 Slava Pestov, Daniel Ehrenberg. ! See http://factorcode.org/license.txt for BSD license. USING: help.syntax help.markup words quotations effects ; -IN: memoize +in: memoize ARTICLE: "memoize" "Memoization" "The " { $vocab-link "memoize" } " vocabulary implements a simple form of memoization, which is when a word caches results for every unique set of inputs that is supplied. Calling a memoized word with the same inputs more than once does not recalculate anything." diff --git a/core/memoize/memoize-tests.factor b/core/memoize/memoize-tests.factor index 8615cc1d30..e4b85afafd 100644 --- a/core/memoize/memoize-tests.factor +++ b/core/memoize/memoize-tests.factor @@ -3,7 +3,7 @@ USING: calendar eval generalizations io.streams.string kernel math math.order memoize namespaces parser prettyprint see sequences threads tools.test tools.time ; -IN: memoize.tests +in: memoize.tests MEMO: fib ( m -- n ) dup 1 <= [ drop 1 ] [ dup 1 - fib swap 2 - fib + ] if ; diff --git a/core/memoize/memoize.factor b/core/memoize/memoize.factor index 34968f2b4a..4a4d5fa221 100644 --- a/core/memoize/memoize.factor +++ b/core/memoize/memoize.factor @@ -3,7 +3,7 @@ USING: accessors arrays assocs definitions effects effects.parser fry hashtables.identity kernel kernel.private math sequences sequences.private words ; -IN: memoize +in: memoize data-room code-room ; -IN: memory.tests +in: memory.tests [ save-image-and-exit ] must-fail @@ -66,7 +66,7 @@ IN: memory.tests ! allocation filled up the heap past the high water mark, this ! promotion might trigger heap growth, even if most of those ! large objects are unreachable. -SYMBOL: foo +symbol: foo { } [ gc @@ -84,7 +84,7 @@ SYMBOL: foo ! Perform one gc cycle. Then increase the stack height by 100 and ! force a gc cycle again. -SYMBOL: foo-var +symbol: foo-var : perform ( -- ) { 1 2 3 } { 4 5 6 } drop ; diff --git a/core/memory/memory.factor b/core/memory/memory.factor index 5c967bc118..edd1887580 100644 --- a/core/memory/memory.factor +++ b/core/memory/memory.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2005, 2009 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: alien.strings io.backend kernel sequences system ; -IN: memory +in: memory PRIMITIVE: all-instances ( -- array ) PRIMITIVE: compact-gc ( -- ) diff --git a/core/modern/compiler/compiler.factor b/core/modern/compiler/compiler.factor index 109ff5998d..950ffa50e7 100644 --- a/core/modern/compiler/compiler.factor +++ b/core/modern/compiler/compiler.factor @@ -5,7 +5,7 @@ combinators.short-circuit definitions effects effects.parser fry graphs io.pathnames kernel lexer locals math math.statistics memoize modern multiline parser quotations sequences sequences.extras sets splitting strings unicode words ; -IN: modern.compiler +in: modern.compiler : vocab>core2-path ( vocab -- path ) ".private" ?tail drop diff --git a/core/modern/modern-tests.factor b/core/modern/modern-tests.factor index 3f38926cde..b2b023acf2 100644 --- a/core/modern/modern-tests.factor +++ b/core/modern/modern-tests.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2016 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. USING: accessors kernel modern sequences strings tools.test ; -IN: modern.tests +in: modern.tests { 0 } [ "" string>literals length ] unit-test { 1 } [ "a" string>literals length ] unit-test @@ -95,4 +95,4 @@ IN: modern.tests { 1 } [ ":foo" string>literals length ] unit-test -{ 1 } [ "( :integer )" string>literals length ] unit-test \ No newline at end of file +{ 1 } [ "( :integer )" string>literals length ] unit-test diff --git a/core/modern/modern.factor b/core/modern/modern.factor index 674d19ed8c..f029ffa649 100644 --- a/core/modern/modern.factor +++ b/core/modern/modern.factor @@ -6,7 +6,7 @@ io.encodings.utf8 io.files kernel locals macros make math math.order modern.paths modern.slices multiline namespaces quotations sequences sequences.extras splitting splitting.monotonic strings unicode ; -IN: modern +in: modern << ! Base rules, everything should have a generator macro @@ -381,7 +381,7 @@ PRIVATE> [ make-tag-literal ] } cond ; -SYMBOL: lexing-delimiters +symbol: lexing-delimiters : add-lexing-delimiter ( rule -- ) [ ] [ delimiter>> ] bi lexing-delimiters get set-once-at ; diff --git a/core/modern/out/out-tests.factor b/core/modern/out/out-tests.factor index 7a5292373a..dfdcd670a7 100644 --- a/core/modern/out/out-tests.factor +++ b/core/modern/out/out-tests.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors combinators.short-circuit kernel modern modern.out sequences tools.test multiline ; -IN: modern.out.tests +in: modern.out.tests : rewrite-same-string ( string -- ? ) [ [ ] rewrite-string ] keep sequence= ; diff --git a/core/modern/out/out.factor b/core/modern/out/out.factor index fbbafc0c13..b14a968f6d 100644 --- a/core/modern/out/out.factor +++ b/core/modern/out/out.factor @@ -5,9 +5,9 @@ combinators.smart continuations fry io io.encodings.utf8 io.files io.streams.string kernel modern modern.paths modern.slices multiline namespaces prettyprint sequences sets splitting strings arrays ; -IN: modern.out +in: modern.out -SYMBOL: last-slice +symbol: last-slice : write-whitespace ( obj -- ) [ last-slice get [ swap slice-between ] [ slice-before ] if* io:write ] @@ -308,4 +308,4 @@ M: compound-sequence-literal write-literal lexable-paths swap rewrite-paths ; inline : transform-core ( quot -- ) - lexable-core-paths swap rewrite-paths ; inline \ No newline at end of file + lexable-core-paths swap rewrite-paths ; inline diff --git a/core/modern/paths/paths.factor b/core/modern/paths/paths.factor index 5a4817d37e..c9fa4efcf7 100644 --- a/core/modern/paths/paths.factor +++ b/core/modern/paths/paths.factor @@ -3,7 +3,7 @@ USING: accessors combinators.smart io.files kernel sequences splitting vocabs.files vocabs.hierarchy vocabs.loader vocabs.metadata sets ; -IN: modern.paths +in: modern.paths : modern-if-available ( path -- path' ) dup ".factor" ?tail [ diff --git a/core/modern/slices/slices.factor b/core/modern/slices/slices.factor index b4937f75f3..853d065af4 100644 --- a/core/modern/slices/slices.factor +++ b/core/modern/slices/slices.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors assocs fry kernel locals math math.private sequences sequences.extras sequences.private unicode ; -IN: modern.slices +in: modern.slices : matching-delimiter ( ch -- ch' ) H{ diff --git a/core/namespaces/namespaces-docs.factor b/core/namespaces/namespaces-docs.factor index b666c6be39..c95edb7c97 100644 --- a/core/namespaces/namespaces-docs.factor +++ b/core/namespaces/namespaces-docs.factor @@ -1,6 +1,6 @@ USING: assocs help.markup help.syntax kernel math namespaces.private quotations words words.symbol ; -IN: namespaces +in: namespaces ARTICLE: "namespaces-combinators" "Namespace combinators" { $subsections diff --git a/core/namespaces/namespaces-tests.factor b/core/namespaces/namespaces-tests.factor index 48f3b1cf12..6d5ef50a63 100644 --- a/core/namespaces/namespaces-tests.factor +++ b/core/namespaces/namespaces-tests.factor @@ -1,6 +1,6 @@ USING: assocs compiler.tree.debugger kernel namespaces tools.test ; -IN: namespaces.tests +in: namespaces.tests H{ } clone "test-namespace" set @@ -14,7 +14,7 @@ H{ } clone "test-namespace" set [ H{ } clone [ f "some-global" set "some-global" get ] with-variables ] unit-test -SYMBOL: test-initialize +symbol: test-initialize f test-initialize set-global @@ -28,7 +28,7 @@ test-initialize [ 5 ] initialize { 5 } [ test-initialize get-global ] unit-test -SYMBOL: toggle-test +symbol: toggle-test { f } [ toggle-test get ] unit-test { t } [ toggle-test [ toggle ] [ get ] bi ] unit-test { f } [ toggle-test [ toggle ] [ get ] bi ] unit-test diff --git a/core/namespaces/namespaces.factor b/core/namespaces/namespaces.factor index 817900416e..1142e2f96a 100644 --- a/core/namespaces/namespaces.factor +++ b/core/namespaces/namespaces.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors arrays assocs hashtables kernel kernel.private math sequences vectors ; -IN: namespaces +in: namespaces > error>> def>> \ blah1 eq? ] must-fail-with -IN: qualified.tests.foo +in: qualified.tests.foo : x ( -- a ) 1 ; : y ( -- a ) 5 ; -IN: qualified.tests.bar +in: qualified.tests.bar : x ( -- a ) 2 ; : y ( -- a ) 4 ; -IN: qualified.tests.baz +in: qualified.tests.baz : x ( -- a ) 3 ; QUALIFIED: qualified.tests.foo diff --git a/core/parser/parser.factor b/core/parser/parser.factor index 9369bbc17e..d2c5a6d596 100644 --- a/core/parser/parser.factor +++ b/core/parser/parser.factor @@ -5,7 +5,7 @@ compiler.units continuations definitions effects io io.encodings.utf8 io.files kernel lexer math.parser namespaces parser.notes quotations sequences sets slots source-files vectors vocabs vocabs.parser words words.symbol ; -IN: parser +in: parser : location ( -- loc ) current-source-file get lexer get line>> 2dup and @@ -19,7 +19,7 @@ M: parsing-word stack-effect drop ( parsed -- parsed ) ; : create-word-in ( str -- word ) current-vocab create-word dup set-last-word dup save-location ; -SYMBOL: auto-use? +symbol: auto-use? : auto-use ( -- ) auto-use? on ; @@ -129,7 +129,7 @@ ERROR: classoid-expected object ; : parse-until ( end -- vec ) 100 swap (parse-until) ; -SYMBOL: quotation-parser +symbol: quotation-parser HOOK: parse-quotation quotation-parser ( -- quot ) @@ -152,7 +152,7 @@ ERROR: bad-number ; : scan-base ( base -- n ) scan-token swap base> [ bad-number ] unless* ; -SYMBOL: bootstrap-syntax +symbol: bootstrap-syntax : with-file-vocabs ( quot -- ) [ @@ -161,7 +161,7 @@ SYMBOL: bootstrap-syntax call ] with-manifest ; inline -SYMBOL: print-use-hook +symbol: print-use-hook print-use-hook [ [ ] ] initialize diff --git a/core/quotations/quotations-docs.factor b/core/quotations/quotations-docs.factor index edd79846cd..a5ea3860d8 100644 --- a/core/quotations/quotations-docs.factor +++ b/core/quotations/quotations-docs.factor @@ -1,5 +1,5 @@ USING: help.markup help.syntax kernel sequences ; -IN: quotations +in: quotations ARTICLE: "quotations" "Quotations" "A quotation is an anonymous function (a value denoting a snippet of code) which can be used as a value and called using the " { $link "call" } "." diff --git a/core/quotations/quotations.factor b/core/quotations/quotations.factor index b4817bf81c..21cf1f7200 100644 --- a/core/quotations/quotations.factor +++ b/core/quotations/quotations.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors arrays kernel kernel.private math sequences sequences.private slots.private ; -IN: quotations +in: quotations BUILTIN: quotation { array array read-only initial: { } } diff --git a/core/sbufs/sbufs-docs.factor b/core/sbufs/sbufs-docs.factor index badf27fa35..eaf0f19314 100644 --- a/core/sbufs/sbufs-docs.factor +++ b/core/sbufs/sbufs-docs.factor @@ -1,6 +1,6 @@ USING: strings arrays byte-arrays help.markup help.syntax kernel vectors ; -IN: sbufs +in: sbufs ARTICLE: "sbufs" "String buffers" "The " { $vocab-link "sbufs" } " vocabulary implements resizable mutable sequence of characters. The literal syntax is covered in " { $link "syntax-sbufs" } "." diff --git a/core/sbufs/sbufs.factor b/core/sbufs/sbufs.factor index b1118bd815..5d3838ea02 100644 --- a/core/sbufs/sbufs.factor +++ b/core/sbufs/sbufs.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors growable kernel math sequences sequences.private strings strings.private ; -IN: sbufs +in: sbufs TUPLE: sbuf { underlying string } diff --git a/core/sequences/generalizations/generalizations-docs.factor b/core/sequences/generalizations/generalizations-docs.factor index 5ecebe44d4..5c0ffb24b7 100644 --- a/core/sequences/generalizations/generalizations-docs.factor +++ b/core/sequences/generalizations/generalizations-docs.factor @@ -1,7 +1,7 @@ ! (c)2009 Joe Groff bsd license USING: help.syntax help.markup kernel sequences quotations math arrays combinators ; -IN: sequences.generalizations +in: sequences.generalizations HELP: nsequence { $values { "n" integer } { "seq" "an exemplar" } } diff --git a/core/sequences/generalizations/generalizations-tests.factor b/core/sequences/generalizations/generalizations-tests.factor index 328f0b7887..d8a9200494 100644 --- a/core/sequences/generalizations/generalizations-tests.factor +++ b/core/sequences/generalizations/generalizations-tests.factor @@ -1,7 +1,7 @@ ! (c)2009 Joe Groff bsd license USING: tools.test generalizations kernel math arrays sequences sequences.generalizations ascii fry math.parser io io.streams.string ; -IN: sequences.generalizations.tests +in: sequences.generalizations.tests { 1 2 3 4 } [ { 1 2 3 4 } 4 firstn ] unit-test { { 1 2 3 4 } } [ 1 2 3 4 { f f f f } [ 4 set-firstn ] keep ] unit-test diff --git a/core/sequences/generalizations/generalizations.factor b/core/sequences/generalizations/generalizations.factor index d0feb06063..ac8ba9efde 100644 --- a/core/sequences/generalizations/generalizations.factor +++ b/core/sequences/generalizations/generalizations.factor @@ -2,7 +2,7 @@ USING: kernel sequences sequences.private math combinators macros math.order math.ranges quotations fry effects memoize.private generalizations ; -IN: sequences.generalizations +in: sequences.generalizations MACRO: nsequence ( n seq -- quot ) [ [nsequence] ] keep '[ @ _ like ] ; diff --git a/core/sequences/sequences-docs.factor b/core/sequences/sequences-docs.factor index 20f400a4d7..64b8f0cad0 100644 --- a/core/sequences/sequences-docs.factor +++ b/core/sequences/sequences-docs.factor @@ -1,6 +1,6 @@ USING: assocs arrays generic.single help.markup help.syntax kernel layouts math math.order quotations sequences.private vectors ; -IN: sequences +in: sequences HELP: sequence { $class-description "A mixin class whose instances are sequences. Custom implementations of the sequence protocol should be declared as instances of this mixin for all sequence functionality to work correctly:" diff --git a/core/sequences/sequences-tests.factor b/core/sequences/sequences-tests.factor index cada259e75..d5dd7e77b9 100644 --- a/core/sequences/sequences-tests.factor +++ b/core/sequences/sequences-tests.factor @@ -1,7 +1,7 @@ USING: arrays assocs byte-arrays generic.single kernel make math math.functions math.order math.parser math.vectors sbufs sequences sequences.private strings tools.test vectors ; -IN: sequences.tests +in: sequences.tests { "empty" } [ { } [ "empty" ] [ "not empty" ] if-empty ] unit-test { { 1 } "not empty" } [ { 1 } [ "empty" ] [ "not empty" ] if-empty ] unit-test diff --git a/core/sequences/sequences.factor b/core/sequences/sequences.factor index f38365741e..41933c2c18 100644 --- a/core/sequences/sequences.factor +++ b/core/sequences/sequences.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors kernel kernel.private math math.order math.private slots.private ; -IN: sequences +in: sequences MIXIN: sequence @@ -1122,7 +1122,7 @@ PRIVATE> ] keep [ [ nth-unsafe ] with { } map-as ] curry { } map-as ; inline -USE: arrays +use: arrays : array-length ( array -- len ) { array } declare length>> ; inline diff --git a/core/sets/sets-docs.factor b/core/sets/sets-docs.factor index 955a56b9da..302f0e82cc 100644 --- a/core/sets/sets-docs.factor +++ b/core/sets/sets-docs.factor @@ -1,6 +1,6 @@ USING: assocs hashtables help.markup help.syntax kernel quotations sequences vectors ; -IN: sets +in: sets ARTICLE: "sets" "Sets" "A set is an unordered collection of elements. Words for working with sets are in the " { $vocab-link "sets" } " vocabulary." $nl diff --git a/core/sets/sets-tests.factor b/core/sets/sets-tests.factor index 1a109c1da6..b7c7b98a34 100644 --- a/core/sets/sets-tests.factor +++ b/core/sets/sets-tests.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: bit-arrays bit-sets kernel math sequences sets sorting tools.test ; -IN: sets.tests +in: sets.tests { V{ 1 2 3 } } [ 3 V{ 1 2 } clone [ adjoin ] keep ] unit-test { V{ 1 2 } } [ 2 V{ 1 2 } clone [ adjoin ] keep ] unit-test diff --git a/core/sets/sets.factor b/core/sets/sets.factor index ab98c578ee..24736d1c46 100644 --- a/core/sets/sets.factor +++ b/core/sets/sets.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2010 Daniel Ehrenberg ! See http://factorcode.org/license.txt for BSD license. USING: assocs hashtables kernel math sequences vectors ; -IN: sets +in: sets ! Set protocol MIXIN: set diff --git a/core/slots/slots-docs.factor b/core/slots/slots-docs.factor index b172713154..36fe97f1fa 100644 --- a/core/slots/slots-docs.factor +++ b/core/slots/slots-docs.factor @@ -2,7 +2,7 @@ USING: help.markup help.syntax generic kernel.private parser kernel quotations namespaces sequences arrays effects generic.standard classes.builtin slots.private classes strings math assocs byte-arrays alien classes.tuple ; -IN: slots +in: slots ARTICLE: "accessors" "Slot accessors" "For every tuple slot, a " { $emphasis "reader" } " method is defined in the " { $vocab-link "accessors" } " vocabulary. The reader is named " { $snippet { $emphasis "slot" } ">>" } " and given a tuple, pushes the slot value on the stack." diff --git a/core/slots/slots-tests.factor b/core/slots/slots-tests.factor index 6405db4cad..760cd1172d 100644 --- a/core/slots/slots-tests.factor +++ b/core/slots/slots-tests.factor @@ -1,6 +1,6 @@ USING: accessors arrays generic.single kernel math math.functions slots tools.test words ; -IN: slots.tests +in: slots.tests TUPLE: r/w-test foo ; diff --git a/core/slots/slots.factor b/core/slots/slots.factor index 5488f03bd6..dbc0b9268e 100644 --- a/core/slots/slots.factor +++ b/core/slots/slots.factor @@ -5,7 +5,7 @@ classes.algebra classes.algebra.private classes.maybe combinators generic generic.standard hashtables kernel kernel.private make math quotations sequences sequences.private slots.private strings words ; -IN: slots +in: slots >path ] [ >>line# ] bi* ] when* ] bi swap >>error ; inline -SYMBOL: error-types +symbol: error-types error-types [ V{ } clone ] initialize @@ -66,7 +66,7 @@ error-types [ V{ } clone ] initialize GENERIC: errors-changed ( observer -- ) -SYMBOL: error-observers +symbol: error-observers [ V{ } clone error-observers set-global diff --git a/core/source-files/source-files-docs.factor b/core/source-files/source-files-docs.factor index c473f6d2cf..2ce03e1fa6 100644 --- a/core/source-files/source-files-docs.factor +++ b/core/source-files/source-files-docs.factor @@ -1,6 +1,6 @@ USING: help.markup help.syntax vocabs.loader io.pathnames strings definitions quotations compiler.units ; -IN: source-files +in: source-files ARTICLE: "source-files" "Source files" "Words in the " { $vocab-link "source-files" } " vocabulary are used to keep track of loaded source files. This is used to implement " { $link "vocabs.refresh" } "." diff --git a/core/source-files/source-files.factor b/core/source-files/source-files.factor index d3eb302215..f694a9261b 100644 --- a/core/source-files/source-files.factor +++ b/core/source-files/source-files.factor @@ -4,9 +4,9 @@ USING: accessors arrays assocs checksums checksums.crc32 compiler.units continuations definitions io.encodings.utf8 io.files io.pathnames kernel namespaces sequences sets source-files.errors strings words ; -IN: source-files +in: source-files -SYMBOL: source-files +symbol: source-files TUPLE: source-file { path string } @@ -52,7 +52,7 @@ M: pathname forget* new-definitions get [ union ] 2map ] change-definitions drop ; -SYMBOL: current-source-file +symbol: current-source-file : wrap-source-file-error ( error -- * ) current-source-file get rollback-source-file diff --git a/core/splitting/splitting-docs.factor b/core/splitting/splitting-docs.factor index ae1e131796..0e729275fa 100644 --- a/core/splitting/splitting-docs.factor +++ b/core/splitting/splitting-docs.factor @@ -1,5 +1,5 @@ USING: help.markup help.syntax kernel sequences strings ; -IN: splitting +in: splitting ARTICLE: "sequences-split" "Splitting sequences" "Splitting sequences at occurrences of subsequences:" diff --git a/core/splitting/splitting.factor b/core/splitting/splitting.factor index 5a413b916e..6599b233cd 100644 --- a/core/splitting/splitting.factor +++ b/core/splitting/splitting.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: arrays kernel math sbufs sequences sequences.private strings ; -IN: splitting +in: splitting declare ; -IN: stack-checker.alien +in: stack-checker.alien TUPLE: alien-node-params return parameters @@ -121,7 +121,7 @@ TUPLE: alien-callback-params < alien-node-params xt ; GENERIC: wrap-callback-quot ( params quot -- quot' ) -SYMBOL: wait-for-callback-hook +symbol: wait-for-callback-hook wait-for-callback-hook [ [ drop ] ] initialize diff --git a/core/stack-checker/backend/backend-docs.factor b/core/stack-checker/backend/backend-docs.factor index 67a5905226..7a7f3fa446 100644 --- a/core/stack-checker/backend/backend-docs.factor +++ b/core/stack-checker/backend/backend-docs.factor @@ -1,6 +1,6 @@ USING: compiler.tree effects help.markup help.syntax math quotations sequences stack-checker.state stack-checker.values stack-checker.visitor words ; -IN: stack-checker.backend +in: stack-checker.backend HELP: consume-d { $values { "n" integer } { "seq" sequence } } diff --git a/core/stack-checker/backend/backend-tests.factor b/core/stack-checker/backend/backend-tests.factor index 37815462bc..c3a23e6543 100644 --- a/core/stack-checker/backend/backend-tests.factor +++ b/core/stack-checker/backend/backend-tests.factor @@ -1,7 +1,7 @@ USING: accessors classes.tuple compiler.tree stack-checker.backend tools.test kernel namespaces stack-checker.state stack-checker.values stack-checker.visitor sequences assocs ; -IN: stack-checker.backend.tests +in: stack-checker.backend.tests { } [ V{ } clone (meta-d) set diff --git a/core/stack-checker/backend/backend.factor b/core/stack-checker/backend/backend.factor index 4e763fa223..65d87f8b08 100644 --- a/core/stack-checker/backend/backend.factor +++ b/core/stack-checker/backend/backend.factor @@ -6,7 +6,7 @@ stack-checker.dependencies stack-checker.errors stack-checker.recursive-state stack-checker.state stack-checker.values stack-checker.visitor words ; FROM: sequences.private => from-end ; -IN: stack-checker.backend +in: stack-checker.backend : push-d ( obj -- ) meta-d push ; diff --git a/core/stack-checker/branches/branches-docs.factor b/core/stack-checker/branches/branches-docs.factor index db93393416..167aa39926 100644 --- a/core/stack-checker/branches/branches-docs.factor +++ b/core/stack-checker/branches/branches-docs.factor @@ -1,5 +1,5 @@ USING: assocs help.markup help.syntax ; -IN: stack-checker.branches +in: stack-checker.branches HELP: collect-variables { $values { "hash" assoc } } diff --git a/core/stack-checker/branches/branches.factor b/core/stack-checker/branches/branches.factor index 04587889ef..1beb79016b 100644 --- a/core/stack-checker/branches/branches.factor +++ b/core/stack-checker/branches/branches.factor @@ -6,7 +6,7 @@ stack-checker.errors stack-checker.recursive-state stack-checker.state stack-checker.values stack-checker.visitor vectors ; FROM: sequences.private => dispatch ; -IN: stack-checker.branches +in: stack-checker.branches : balanced? ( pairs -- ? ) [ second ] filter [ first2 length - ] map all-equal? ; diff --git a/core/stack-checker/dependencies/dependencies.factor b/core/stack-checker/dependencies/dependencies.factor index 38c2ccd7d3..b67ce625da 100644 --- a/core/stack-checker/dependencies/dependencies.factor +++ b/core/stack-checker/dependencies/dependencies.factor @@ -4,10 +4,10 @@ USING: accessors alien.c-types arrays assocs classes classes.algebra classes.tuple combinators.short-circuit fry generic kernel math namespaces sequences sets words ; FROM: classes.tuple.private => tuple-layout ; -IN: stack-checker.dependencies +in: stack-checker.dependencies ! Words that the current quotation depends on -SYMBOL: dependencies +symbol: dependencies SYMBOLS: effect-dependency conditional-dependency definition-dependency ; @@ -53,7 +53,7 @@ M: pointer add-depends-on-c-type to>> add-depends-on-c-type ; ! Generic words that the current quotation depends on -SYMBOL: generic-dependencies +symbol: generic-dependencies : ?class-or ( class class/f -- class' ) [ class-or ] when* ; @@ -64,7 +64,7 @@ SYMBOL: generic-dependencies ! Conditional dependencies are re-evaluated when classes change; ! if any fail, the word is recompiled -SYMBOL: conditional-dependencies +symbol: conditional-dependencies GENERIC: satisfied? ( dependency -- ? ) diff --git a/core/stack-checker/errors/errors-docs.factor b/core/stack-checker/errors/errors-docs.factor index 4f1bb28c5e..767badabde 100644 --- a/core/stack-checker/errors/errors-docs.factor +++ b/core/stack-checker/errors/errors-docs.factor @@ -1,6 +1,6 @@ USING: help.markup help.syntax kernel effects sequences sequences.private words combinators ; -IN: stack-checker.errors +in: stack-checker.errors HELP: do-not-compile { $error-description "Thrown when inference encounters a macro being applied to a value which is not known to be a literal. Such code needs changes before it can compile and run. See " { $link "inference-combinators" } " and " { $link "inference-escape" } " for details." } diff --git a/core/stack-checker/errors/errors.factor b/core/stack-checker/errors/errors.factor index f3aeb7bb64..eb8131395c 100644 --- a/core/stack-checker/errors/errors.factor +++ b/core/stack-checker/errors/errors.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2006, 2010 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: vocabs.loader ; -IN: stack-checker.errors +in: stack-checker.errors TUPLE: inference-error ; diff --git a/core/stack-checker/inlining/inlining-docs.factor b/core/stack-checker/inlining/inlining-docs.factor index 8256b4548d..a98aa93c22 100644 --- a/core/stack-checker/inlining/inlining-docs.factor +++ b/core/stack-checker/inlining/inlining-docs.factor @@ -1,5 +1,5 @@ USING: compiler.tree help.markup help.syntax words ; -IN: stack-checker.inlining +in: stack-checker.inlining HELP: inline-recursive-word { $values { "word" word } } diff --git a/core/stack-checker/inlining/inlining.factor b/core/stack-checker/inlining/inlining.factor index 2d82a6262d..522876a250 100644 --- a/core/stack-checker/inlining/inlining.factor +++ b/core/stack-checker/inlining/inlining.factor @@ -6,7 +6,7 @@ stack-checker.dependencies stack-checker.errors stack-checker.known-words stack-checker.recursive-state stack-checker.state stack-checker.values stack-checker.visitor vectors words ; -IN: stack-checker.inlining +in: stack-checker.inlining ! Code to handle inline words. Much of the complexity stems from ! having to handle recursive inline words. @@ -38,8 +38,8 @@ loop? ; [ quotation-param? [ copy-value ] [ drop ] if ] 2map [ length make-values ] dip append ; -SYMBOL: enter-in -SYMBOL: enter-out +symbol: enter-in +symbol: enter-out : prepare-stack ( word -- ) required-stack-effect in>> diff --git a/core/stack-checker/known-words/known-words-docs.factor b/core/stack-checker/known-words/known-words-docs.factor index cfa16aa408..84c9eb90f7 100644 --- a/core/stack-checker/known-words/known-words-docs.factor +++ b/core/stack-checker/known-words/known-words-docs.factor @@ -1,6 +1,6 @@ USING: combinators help.markup help.syntax kernel kernel.private sequences words ; -IN: stack-checker.known-words +in: stack-checker.known-words HELP: check-declaration { $values { "declaration" sequence } } diff --git a/core/stack-checker/known-words/known-words-tests.factor b/core/stack-checker/known-words/known-words-tests.factor index 96e54a7d9d..42a2ed3283 100644 --- a/core/stack-checker/known-words/known-words-tests.factor +++ b/core/stack-checker/known-words/known-words-tests.factor @@ -2,7 +2,7 @@ USING: accessors classes.tuple compiler.tree kernel namespaces sequences stack-checker.backend stack-checker.known-words stack-checker.recursive-state stack-checker.state stack-checker.values stack-checker.visitor tools.test words ; -IN: stack-checker.known-words.tests +in: stack-checker.known-words.tests ! Because node is an identity-tuple : node-seqs-eq? ( seq1 seq2 -- ? ) diff --git a/core/stack-checker/known-words/known-words.factor b/core/stack-checker/known-words/known-words.factor index 7e813d1b87..fd97128d9a 100644 --- a/core/stack-checker/known-words/known-words.factor +++ b/core/stack-checker/known-words/known-words.factor @@ -26,7 +26,7 @@ stack-checker.dependencies stack-checker.recursive-state stack-checker.row-polymorphism ; QUALIFIED-WITH: generic.single.private gsp -IN: stack-checker.known-words +in: stack-checker.known-words : infer-special ( word -- ) [ current-word set ] [ "special" word-prop call( -- ) ] bi ; diff --git a/core/stack-checker/recursive-state/recursive-state-docs.factor b/core/stack-checker/recursive-state/recursive-state-docs.factor index 84a6dbea7c..a96df5ccd3 100644 --- a/core/stack-checker/recursive-state/recursive-state-docs.factor +++ b/core/stack-checker/recursive-state/recursive-state-docs.factor @@ -1,5 +1,5 @@ USING: compiler.tree effects help.markup help.syntax kernel math quotations ; -IN: stack-checker.recursive-state +in: stack-checker.recursive-state HELP: recursive-quotation? { $values { "quot" quotation } { "?" boolean } } diff --git a/core/stack-checker/recursive-state/recursive-state.factor b/core/stack-checker/recursive-state/recursive-state.factor index b4f528765a..d40bb818b2 100644 --- a/core/stack-checker/recursive-state/recursive-state.factor +++ b/core/stack-checker/recursive-state/recursive-state.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors kernel namespaces stack-checker.recursive-state.tree ; -IN: stack-checker.recursive-state +in: stack-checker.recursive-state TUPLE: recursive-state quotations inline-words ; diff --git a/core/stack-checker/recursive-state/tree/tree.factor b/core/stack-checker/recursive-state/tree/tree.factor index dd392af7c9..8ddad71cc3 100644 --- a/core/stack-checker/recursive-state/tree/tree.factor +++ b/core/stack-checker/recursive-state/tree/tree.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: accessors kernel sequences math math.order ; -IN: stack-checker.recursive-state.tree +in: stack-checker.recursive-state.tree ! Persistent unbalanced hash tree using eq? comparison. ! We use this to speed up stack-checker.recursive-state. diff --git a/core/stack-checker/row-polymorphism/row-polymorphism.factor b/core/stack-checker/row-polymorphism/row-polymorphism.factor index 1bcf6d2753..80c046e337 100644 --- a/core/stack-checker/row-polymorphism/row-polymorphism.factor +++ b/core/stack-checker/row-polymorphism/row-polymorphism.factor @@ -4,7 +4,7 @@ USING: accessors arrays assocs combinators combinators.short-circuit effects kernel math math.order namespaces sequences stack-checker.errors stack-checker.state stack-checker.values ; -IN: stack-checker.row-polymorphism +in: stack-checker.row-polymorphism : with-inner-d ( quot -- inner-d ) inner-d-index get diff --git a/core/stack-checker/stack-checker-docs.factor b/core/stack-checker/stack-checker-docs.factor index 478d7c00d6..a4fddfb88f 100644 --- a/core/stack-checker/stack-checker-docs.factor +++ b/core/stack-checker/stack-checker-docs.factor @@ -1,6 +1,6 @@ USING: classes continuations effects help.markup help.syntax io kernel quotations sequences stack-checker.errors ; -IN: stack-checker +in: stack-checker ARTICLE: "inference-simple" "Straight-line stack effects" "The simplest case is when a piece of code does not have any branches or recursion, and just pushes literals and calls words." diff --git a/core/stack-checker/stack-checker-tests.factor b/core/stack-checker/stack-checker-tests.factor index 5426b773b2..323eca5a81 100644 --- a/core/stack-checker/stack-checker-tests.factor +++ b/core/stack-checker/stack-checker-tests.factor @@ -8,7 +8,7 @@ classes.tuple classes.union classes.predicate debugger threads.private io.streams.string io.timeouts io.thread sequences.private destructors combinators eval locals.backend system compiler.units shuffle vocabs combinators.smart ; -IN: stack-checker.tests +in: stack-checker.tests [ 1234 infer ] must-fail @@ -119,7 +119,7 @@ DEFER: foe { 1 0 } [ nested-when* ] must-infer-as -SYMBOL: sym-test +symbol: sym-test { 0 1 } [ sym-test ] must-infer-as @@ -264,7 +264,7 @@ DEFER: inline-recursive-2 { 0 0 } [ inline-recursive-1 ] must-infer-as ! Hooks -SYMBOL: my-var +symbol: my-var HOOK: my-hook my-var ( -- x ) M: integer my-hook "an integer" ; diff --git a/core/stack-checker/stack-checker.factor b/core/stack-checker/stack-checker.factor index 1bf75e7ec9..56981d6191 100644 --- a/core/stack-checker/stack-checker.factor +++ b/core/stack-checker/stack-checker.factor @@ -6,7 +6,7 @@ stack-checker.backend stack-checker.state stack-checker.known-words stack-checker.transforms stack-checker.errors stack-checker.inlining stack-checker.visitor.dummy ; -IN: stack-checker +in: stack-checker GENERIC: infer ( quot -- effect ) diff --git a/core/stack-checker/state/state-docs.factor b/core/stack-checker/state/state-docs.factor index ea27e6fa4d..28dcd70970 100644 --- a/core/stack-checker/state/state-docs.factor +++ b/core/stack-checker/state/state-docs.factor @@ -1,6 +1,6 @@ USING: compiler.tree effects help.markup help.syntax quotations sequences stack-checker.values stack-checker.visitor ; -IN: stack-checker.state +in: stack-checker.state HELP: terminated? { $var-description "Did the current control-flow path throw an error?" } ; diff --git a/core/stack-checker/state/state-tests.factor b/core/stack-checker/state/state-tests.factor index 24dd34bb23..61a7ce01b2 100644 --- a/core/stack-checker/state/state-tests.factor +++ b/core/stack-checker/state/state-tests.factor @@ -1,7 +1,7 @@ USING: accessors assocs classes.tuple compiler.tree kernel namespaces sequences stack-checker.backend stack-checker.recursive-state stack-checker.state stack-checker.values stack-checker.visitor tools.test ; -IN: stack-checker.state.tests +in: stack-checker.state.tests { V{ 1 2 3 } diff --git a/core/stack-checker/state/state.factor b/core/stack-checker/state/state.factor index 8a9d1d9300..b5ca8912a5 100644 --- a/core/stack-checker/state/state.factor +++ b/core/stack-checker/state/state.factor @@ -4,23 +4,23 @@ USING: assocs arrays namespaces sequences kernel definitions math effects accessors words fry classes.algebra compiler.units stack-checker.values stack-checker.visitor stack-checker.errors ; -IN: stack-checker.state +in: stack-checker.state -SYMBOL: terminated? +symbol: terminated? -SYMBOL: input-count -SYMBOL: inner-d-index +symbol: input-count +symbol: inner-d-index DEFER: commit-literals -SYMBOL: (meta-d) -SYMBOL: (meta-r) +symbol: (meta-d) +symbol: (meta-r) : meta-d ( -- stack ) commit-literals (meta-d) get ; : meta-r ( -- stack ) (meta-r) get ; -SYMBOL: literals +symbol: literals : (push-literal) ( obj -- ) dup make-known diff --git a/core/stack-checker/transforms/transforms-docs.factor b/core/stack-checker/transforms/transforms-docs.factor index c6675ba6d4..0af836b563 100644 --- a/core/stack-checker/transforms/transforms-docs.factor +++ b/core/stack-checker/transforms/transforms-docs.factor @@ -1,4 +1,4 @@ -IN: stack-checker.transforms +in: stack-checker.transforms USING: help.markup help.syntax combinators words kernel ; HELP: define-transform diff --git a/core/stack-checker/transforms/transforms-tests.factor b/core/stack-checker/transforms/transforms-tests.factor index 204d42f310..943529fe93 100644 --- a/core/stack-checker/transforms/transforms-tests.factor +++ b/core/stack-checker/transforms/transforms-tests.factor @@ -1,4 +1,4 @@ -IN: stack-checker.transforms.tests +in: stack-checker.transforms.tests USING: sequences stack-checker.transforms tools.test math kernel quotations stack-checker stack-checker.errors accessors combinators words arrays classes classes.tuple macros ; diff --git a/core/stack-checker/transforms/transforms.factor b/core/stack-checker/transforms/transforms.factor index b5d087098f..1fe752230a 100644 --- a/core/stack-checker/transforms/transforms.factor +++ b/core/stack-checker/transforms/transforms.factor @@ -6,7 +6,7 @@ locals namespaces quotations sequences stack-checker.backend stack-checker.dependencies stack-checker.errors stack-checker.recursive-state stack-checker.values stack-checker.visitor words ; -IN: stack-checker.transforms +in: stack-checker.transforms : call-transformer ( stack quot -- newquot ) '[ _ _ with-datastack [ length 1 assert= ] [ first ] bi ] diff --git a/core/stack-checker/values/values-docs.factor b/core/stack-checker/values/values-docs.factor index 4617d50415..113a5ad077 100644 --- a/core/stack-checker/values/values-docs.factor +++ b/core/stack-checker/values/values-docs.factor @@ -1,5 +1,5 @@ USING: hashtables help.markup help.syntax math quotations sequences words ; -IN: stack-checker.values +in: stack-checker.values HELP: curried { $class-description "Result of curry." } ; diff --git a/core/stack-checker/values/values-tests.factor b/core/stack-checker/values/values-tests.factor index c92ce9d6f9..8041c27433 100644 --- a/core/stack-checker/values/values-tests.factor +++ b/core/stack-checker/values/values-tests.factor @@ -1,6 +1,6 @@ USING: kernel namespaces stack-checker.backend stack-checker.values tools.test ; -IN: stack-checker.values.tests +in: stack-checker.values.tests { H{ { 3 input-parameter } } } [ init-known-values diff --git a/core/stack-checker/values/values.factor b/core/stack-checker/values/values.factor index 603dd9fd40..9f2057f160 100644 --- a/core/stack-checker/values/values.factor +++ b/core/stack-checker/values/values.factor @@ -2,11 +2,11 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors assocs fry kernel namespaces quotations sequences stack-checker.errors stack-checker.recursive-state ; -IN: stack-checker.values +in: stack-checker.values : ( -- value ) \ counter ; -SYMBOL: known-values +symbol: known-values : init-known-values ( -- ) H{ } clone known-values set ; @@ -90,9 +90,9 @@ M: composed (literal-value?) M: composed (literal) >composed< [ compose ] curried/composed-literal ; -SINGLETON: input-parameter +singleton: input-parameter -SYMBOL: current-word +symbol: current-word M: input-parameter (input-value?) drop t ; diff --git a/core/stack-checker/visitor/dummy/dummy.factor b/core/stack-checker/visitor/dummy/dummy.factor index 5ff00afa14..9326b925c8 100644 --- a/core/stack-checker/visitor/dummy/dummy.factor +++ b/core/stack-checker/visitor/dummy/dummy.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2008, 2010 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: stack-checker.visitor kernel ; -IN: stack-checker.visitor.dummy +in: stack-checker.visitor.dummy M: f child-visitor f ; M: f #introduce, drop ; diff --git a/core/stack-checker/visitor/visitor-docs.factor b/core/stack-checker/visitor/visitor-docs.factor index 6713feeb62..ea273130eb 100644 --- a/core/stack-checker/visitor/visitor-docs.factor +++ b/core/stack-checker/visitor/visitor-docs.factor @@ -1,5 +1,5 @@ USING: compiler.tree help.markup help.syntax kernel sequences words ; -IN: stack-checker.visitor +in: stack-checker.visitor HELP: #>r, { $values { "inputs" sequence } { "outputs" sequence } } diff --git a/core/stack-checker/visitor/visitor.factor b/core/stack-checker/visitor/visitor.factor index 5871f73a4a..6f349712ae 100644 --- a/core/stack-checker/visitor/visitor.factor +++ b/core/stack-checker/visitor/visitor.factor @@ -1,9 +1,9 @@ ! Copyright (C) 2008, 2010 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: kernel arrays namespaces ; -IN: stack-checker.visitor +in: stack-checker.visitor -SYMBOL: stack-visitor +symbol: stack-visitor HOOK: child-visitor stack-visitor ( -- visitor ) diff --git a/core/strings/parser/parser-docs.factor b/core/strings/parser/parser-docs.factor index 3079f108e6..4971964eec 100644 --- a/core/strings/parser/parser-docs.factor +++ b/core/strings/parser/parser-docs.factor @@ -1,5 +1,5 @@ USING: help.markup help.syntax strings lexer ; -IN: strings.parser +in: strings.parser HELP: bad-escape { $error-description "Indicates the parser encountered an invalid escape code following a backslash (" { $snippet "\\" } ") in a string literal. See " { $link "escape" } " for a list of valid escape codes." } ; diff --git a/core/strings/parser/parser.factor b/core/strings/parser/parser.factor index 056d6527c4..a8d64842c1 100644 --- a/core/strings/parser/parser.factor +++ b/core/strings/parser/parser.factor @@ -3,7 +3,7 @@ USING: accessors assocs combinators continuations kernel kernel.private lexer math math.parser namespaces sbufs sequences splitting strings ; -IN: strings.parser +in: strings.parser ERROR: bad-escape char ; @@ -24,7 +24,7 @@ ERROR: bad-escape char ; { CHAR: \" CHAR: \" } } ?at [ bad-escape ] unless ; -SYMBOL: name>char-hook +symbol: name>char-hook name>char-hook [ [ "Unicode support not available" throw ] diff --git a/core/strings/strings-docs.factor b/core/strings/strings-docs.factor index 17fa4ab8c4..39af7de20b 100644 --- a/core/strings/strings-docs.factor +++ b/core/strings/strings-docs.factor @@ -1,7 +1,7 @@ USING: arrays byte-arrays help.markup help.syntax kernel kernel.private strings.private sequences vectors sbufs math help.vocabs ; -IN: strings +in: strings ARTICLE: "strings" "Strings" "The " { $vocab-link "strings" } " vocabulary implements a data type for storing text. Strings are represented as fixed-size mutable sequences of Unicode code points. Code points are represented as integers in the range [0,2,097,152]." diff --git a/core/strings/strings.factor b/core/strings/strings.factor index 4bbf642ca0..87b894c84a 100644 --- a/core/strings/strings.factor +++ b/core/strings/strings.factor @@ -3,7 +3,7 @@ USING: accessors alien.accessors byte-arrays kernel kernel.private math math.private sequences sequences.private slots.private ; -IN: strings +in: strings BUILTIN: string { length array-capacity read-only initial: 0 } aux ; diff --git a/core/summary/summary-docs.factor b/core/summary/summary-docs.factor index a5b12ecd73..8733d60b39 100644 --- a/core/summary/summary-docs.factor +++ b/core/summary/summary-docs.factor @@ -1,4 +1,4 @@ -IN: summary +in: summary USING: kernel strings help.markup help.syntax ; ARTICLE: "summary" "Converting objects to summary strings" diff --git a/core/summary/summary-tests.factor b/core/summary/summary-tests.factor index 62fd1bbf8f..edc5fff6b9 100644 --- a/core/summary/summary-tests.factor +++ b/core/summary/summary-tests.factor @@ -1,5 +1,5 @@ USING: combinators continuations kernel summary tools.test ; -IN: summary.tests +in: summary.tests { "array with 2 elements" } [ { 1 2 } summary ] unit-test { "string with 5 characters" } [ "hello" summary ] unit-test diff --git a/core/summary/summary.factor b/core/summary/summary.factor index a624d933b3..7991d844d1 100644 --- a/core/summary/summary.factor +++ b/core/summary/summary.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors assocs classes continuations kernel make math math.parser sequences sets strings ; -IN: summary +in: summary GENERIC: summary ( object -- string ) diff --git a/core/syntax/syntax-docs.factor b/core/syntax/syntax-docs.factor index a4f93aea50..6759a3d869 100644 --- a/core/syntax/syntax-docs.factor +++ b/core/syntax/syntax-docs.factor @@ -3,7 +3,7 @@ effects generic generic.math generic.single help.markup help.syntax io.pathnames kernel math parser sequences vocabs.loader vocabs.parser words words.alias words.constant words.symbol ; -IN: syntax +in: syntax ARTICLE: "parser-algorithm" "Parser algorithm" "At the most abstract level, Factor syntax consists of whitespace-separated tokens. The parser tokenizes the input on whitespace boundaries. The parser is case-sensitive and whitespace between tokens is significant, so the following three expressions tokenize differently:" diff --git a/core/syntax/syntax.factor b/core/syntax/syntax.factor index 074c7ca26f..85b6a86e42 100644 --- a/core/syntax/syntax.factor +++ b/core/syntax/syntax.factor @@ -13,7 +13,7 @@ parser quotations sbufs sequences slots source-files splitting stack-checker strings strings.parser strings.parser.private typed vectors vocabs vocabs.parser words words.alias words.constant words.symbol delegate.private hints ; -IN: bootstrap.syntax +in: bootstrap.syntax ! These words are defined as a top-level form, instead of with ! defining parsing words, because during stage1 bootstrap, the diff --git a/core/system/system-docs.factor b/core/system/system-docs.factor index cee27e05d3..5e4f467130 100644 --- a/core/system/system-docs.factor +++ b/core/system/system-docs.factor @@ -1,5 +1,5 @@ USING: classes.singleton help.markup help.syntax init kernel math ; -IN: system +in: system ABOUT: "system" diff --git a/core/system/system.factor b/core/system/system.factor index 63a5253596..8d6f380816 100644 --- a/core/system/system.factor +++ b/core/system/system.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: assocs continuations init io kernel kernel.private make math math.parser namespaces sequences ; -IN: system +in: system PRIMITIVE: (exit) ( n -- * ) PRIMITIVE: nano-count ( -- ns ) diff --git a/core/typed/namespaces/namespaces-tests.factor b/core/typed/namespaces/namespaces-tests.factor index 3e497be51c..758bd55bb0 100644 --- a/core/typed/namespaces/namespaces-tests.factor +++ b/core/typed/namespaces/namespaces-tests.factor @@ -1,7 +1,7 @@ USING: compiler.tree.debugger math tools.test typed.namespaces ; -IN: typed.namespaces.tests +in: typed.namespaces.tests -SYMBOL: pi +symbol: pi [ 22/7 pi float typed-set ] [ variable-type-error? ] must-fail-with diff --git a/core/typed/namespaces/namespaces.factor b/core/typed/namespaces/namespaces.factor index f86ad952a3..ca485d889f 100644 --- a/core/typed/namespaces/namespaces.factor +++ b/core/typed/namespaces/namespaces.factor @@ -1,6 +1,6 @@ USING: arrays classes fry kernel kernel.private locals macros namespaces ; -IN: typed.namespaces +in: typed.namespaces ERROR: variable-type-error variable value type ; diff --git a/core/typed/typed-docs.factor b/core/typed/typed-docs.factor index dc7962c647..29781706f6 100644 --- a/core/typed/typed-docs.factor +++ b/core/typed/typed-docs.factor @@ -1,6 +1,6 @@ ! (c)2009 Joe Groff bsd license USING: arrays effects help.markup help.syntax locals math quotations words ; -IN: typed +in: typed HELP: TYPED: { $syntax @@ -12,7 +12,7 @@ HELP: TYPED: "A version of " { $link + } " specialized for floats, converting other real number types:" { $example "USING: math prettyprint typed ; -IN: scratchpad +in: scratchpad TYPED: add-floats ( a: float b: float -- c: float ) + ; @@ -30,7 +30,7 @@ HELP: TYPED:: "A version of the quadratic formula specialized for floats, converting other real number types:" { $example "USING: kernel math math.libm prettyprint typed ; -IN: scratchpad +in: scratchpad TYPED:: quadratic-roots ( a: float b: float c: float -- q1: float q2: float ) b neg diff --git a/core/typed/typed-tests.factor b/core/typed/typed-tests.factor index 6254813943..93947343b2 100644 --- a/core/typed/typed-tests.factor +++ b/core/typed/typed-tests.factor @@ -2,7 +2,7 @@ USING: accessors compiler.units effects eval kernel kernel.private layouts literals math namespaces quotations tools.test typed words words.symbol combinators.short-circuit compiler.tree.debugger prettyprint definitions sequences classes.intersection strings classes.union ; -IN: typed.tests +in: typed.tests TYPED: f+ ( a: float b: float -- c: float ) + ; @@ -67,7 +67,7 @@ TYPED: unboxy ( in: unboxable -- out: unboxable2 ) [ " USING: kernel math ; -IN: typed.tests +in: typed.tests TUPLE: unboxable { x fixnum read-only } @@ -77,7 +77,7 @@ TUPLE: unboxable " USING: accessors kernel math ; -IN: typed.tests +in: typed.tests T{ unboxable f 12 3 4.0 } unboxy xy>> " eval( -- xy ) ] unit-test @@ -97,7 +97,7 @@ TYPED: no-inputs-unboxable-output ( -- out: unboxable3 ) { f } [ no-inputs-unboxable-output no-inputs-unboxable-output eq? ] unit-test -SYMBOL: buh +symbol: buh TYPED: no-outputs ( x: integer -- ) buh set ; @@ -142,7 +142,7 @@ TYPED: flush-test ( s: symbol -- ? ) on t ; flushable : flush-print-1 ( symbol -- ) flush-test drop ; : flush-print-2 ( symbol -- ) flush-test . ; -SYMBOL: a-symbol +symbol: a-symbol { f } [ f a-symbol [ diff --git a/core/typed/typed.factor b/core/typed/typed.factor index 895038a952..761745e4ba 100644 --- a/core/typed/typed.factor +++ b/core/typed/typed.factor @@ -6,7 +6,7 @@ sequences slots words locals effects.parser locals.parser macros stack-checker.dependencies classes.maybe classes.algebra ; FROM: classes.tuple.private => tuple-layout ; -IN: typed +in: typed ERROR: type-mismatch-error value expected-type word expected-types ; ERROR: input-mismatch-error < type-mismatch-error ; diff --git a/core/vectors/vectors-docs.factor b/core/vectors/vectors-docs.factor index 615a52c637..837a73f367 100644 --- a/core/vectors/vectors-docs.factor +++ b/core/vectors/vectors-docs.factor @@ -1,5 +1,5 @@ USING: help.markup help.syntax kernel sequences ; -IN: vectors +in: vectors ARTICLE: "vectors" "Vectors" "The " { $vocab-link "vectors" } " vocabulary implements resizable mutable sequence which support the " { $link "sequence-protocol" } "." diff --git a/core/vectors/vectors.factor b/core/vectors/vectors.factor index 403cc63384..9279948988 100644 --- a/core/vectors/vectors.factor +++ b/core/vectors/vectors.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors arrays growable kernel math sequences sequences.private ; -IN: vectors +in: vectors TUPLE: vector { underlying array } diff --git a/core/vocabs/loader/loader-docs.factor b/core/vocabs/loader/loader-docs.factor index b1f1796e14..01e1586244 100755 --- a/core/vocabs/loader/loader-docs.factor +++ b/core/vocabs/loader/loader-docs.factor @@ -1,6 +1,6 @@ USING: vocabs vocabs.loader.private help.markup help.syntax words strings io hashtables ; -IN: vocabs.loader +in: vocabs.loader ARTICLE: "add-vocab-roots" "Working with code outside of the Factor source tree" "You can work with code outside of the Factor source tree by adding additional directories to the list of vocabulary roots." diff --git a/core/vocabs/loader/loader-tests.factor b/core/vocabs/loader/loader-tests.factor index 5f27237f8e..d143e5255d 100644 --- a/core/vocabs/loader/loader-tests.factor +++ b/core/vocabs/loader/loader-tests.factor @@ -2,7 +2,7 @@ USING: accessors compiler.units continuations debugger definitions eval io.streams.string kernel math namespaces parser prettyprint sequences sets source-files tools.test vocabs vocabs.files vocabs.loader vocabs.parser vocabs.refresh words ; -IN: vocabs.loader.tests +in: vocabs.loader.tests ! This vocab should not exist, but just in case... { } [ @@ -17,13 +17,13 @@ IN: vocabs.loader.tests { t } [ "kernel" >vocab-link "kernel" lookup-vocab = ] unit-test -IN: vocabs.loader.test.2 +in: vocabs.loader.test.2 : hello ( -- ) ; MAIN: hello -IN: vocabs.loader.tests +in: vocabs.loader.tests { } [ "vocabs.loader.test.2" run diff --git a/core/vocabs/loader/loader.factor b/core/vocabs/loader/loader.factor index d993f39a52..489e585dfe 100644 --- a/core/vocabs/loader/loader.factor +++ b/core/vocabs/loader/loader.factor @@ -3,11 +3,11 @@ USING: accessors arrays assocs continuations definitions init io io.files io.pathnames kernel make namespaces parser sequences sets splitting strings vocabs words ; -IN: vocabs.loader +in: vocabs.loader -SYMBOL: vocab-roots +symbol: vocab-roots -SYMBOL: add-vocab-root-hook +symbol: add-vocab-root-hook [ V{ @@ -34,7 +34,7 @@ SYMBOL: add-vocab-root-hook [ vocab-roots get adjoin ] [ add-vocab-root-hook get-global call( root -- ) ] bi ; -SYMBOL: root-cache +symbol: root-cache root-cache [ H{ } clone ] initialize ERROR: not-found-in-roots path ; @@ -73,18 +73,18 @@ PRIVATE> : vocab-docs-path ( vocab -- path/f ) dup "-docs.factor" append-vocab-dir vocab-append-path ; -SYMBOL: load-help? +symbol: load-help? ! Defined by vocabs.metadata -SYMBOL: check-vocab-hook +symbol: check-vocab-hook check-vocab-hook [ [ drop ] ] initialize "To define one, refer to \\ MAIN: help" print ] ?if ; -SYMBOL: blacklist +symbol: blacklist : require-all ( vocabs -- ) V{ } clone blacklist [ [ require ] each ] with-variable ; diff --git a/core/vocabs/loader/test/a/a.factor b/core/vocabs/loader/test/a/a.factor index 35079ba444..53d8f5c6fa 100644 --- a/core/vocabs/loader/test/a/a.factor +++ b/core/vocabs/loader/test/a/a.factor @@ -1,5 +1,5 @@ USING: namespaces parser ; -IN: vocabs.loader.test.a +in: vocabs.loader.test.a << global [ "count-me" inc ] with-variables >> diff --git a/core/vocabs/loader/test/b/b.factor b/core/vocabs/loader/test/b/b.factor index 27f66132f2..0f9282833e 100644 --- a/core/vocabs/loader/test/b/b.factor +++ b/core/vocabs/loader/test/b/b.factor @@ -1,5 +1,5 @@ USING: namespaces ; -IN: vocabs.loader.test.b +in: vocabs.loader.test.b << global [ "count-me" inc ] with-variables >> diff --git a/core/vocabs/loader/test/c/c.factor b/core/vocabs/loader/test/c/c.factor index 80c0c0d8e1..c093d8fd24 100644 --- a/core/vocabs/loader/test/c/c.factor +++ b/core/vocabs/loader/test/c/c.factor @@ -1,4 +1,4 @@ -IN: vocabs.loader.test.c +in: vocabs.loader.test.c GENERIC: foo M: foo diff --git a/core/vocabs/loader/test/d/d.factor b/core/vocabs/loader/test/d/d.factor index 12b5f7cb0e..4404ca861c 100644 --- a/core/vocabs/loader/test/d/d.factor +++ b/core/vocabs/loader/test/d/d.factor @@ -1,4 +1,4 @@ USING: math.private ; -IN: vocabs.loader.test.d +in: vocabs.loader.test.d : foo ( -- ) iterate-next ; diff --git a/core/vocabs/loader/test/f/f.factor b/core/vocabs/loader/test/f/f.factor index a68d903a83..18c6dd06e9 100644 --- a/core/vocabs/loader/test/f/f.factor +++ b/core/vocabs/loader/test/f/f.factor @@ -1,4 +1,4 @@ -IN: vocabs.laoder.test.f -USE: vocabs +in: vocabs.laoder.test.f +use: vocabs "vocabs.loader.test.g" require diff --git a/core/vocabs/loader/test/g/g.factor b/core/vocabs/loader/test/g/g.factor index 3cb99a5a05..d8f7af5d11 100644 --- a/core/vocabs/loader/test/g/g.factor +++ b/core/vocabs/loader/test/g/g.factor @@ -1,4 +1,4 @@ -IN: vocabs.loader.test.g +in: vocabs.loader.test.g USING: vocabs.loader.test.f namespaces ; [ "vocabs.loader.test.g" inc ] with-global diff --git a/core/vocabs/loader/test/h/h.factor b/core/vocabs/loader/test/h/h.factor index 510062191f..cff7dc7d84 100644 --- a/core/vocabs/loader/test/h/h.factor +++ b/core/vocabs/loader/test/h/h.factor @@ -1 +1 @@ -USE: vocabs.loader.test.i +use: vocabs.loader.test.i diff --git a/core/vocabs/loader/test/i/i.factor b/core/vocabs/loader/test/i/i.factor index 932288daa2..65dc235861 100644 --- a/core/vocabs/loader/test/i/i.factor +++ b/core/vocabs/loader/test/i/i.factor @@ -1,2 +1,2 @@ -IN: vocabs.loader.test.i -USE: vocabs.loader.test.h +in: vocabs.loader.test.i +use: vocabs.loader.test.h diff --git a/core/vocabs/loader/test/j/j.factor b/core/vocabs/loader/test/j/j.factor index d6aaf06a5e..e79033cd01 100644 --- a/core/vocabs/loader/test/j/j.factor +++ b/core/vocabs/loader/test/j/j.factor @@ -1,3 +1,3 @@ USING: vocabs ; -IN: vocabs.loader.test.j +in: vocabs.loader.test.j "vocabs.loader.test.k" require diff --git a/core/vocabs/loader/test/k/k.factor b/core/vocabs/loader/test/k/k.factor index 603b48b374..463f96badc 100644 --- a/core/vocabs/loader/test/k/k.factor +++ b/core/vocabs/loader/test/k/k.factor @@ -1,2 +1,2 @@ -IN: vocabs.loader.test.k -USE: vocabs.loader.test.j +in: vocabs.loader.test.k +use: vocabs.loader.test.j diff --git a/core/vocabs/loader/test/l/l.factor b/core/vocabs/loader/test/l/l.factor index 8764d066f6..182705bf33 100644 --- a/core/vocabs/loader/test/l/l.factor +++ b/core/vocabs/loader/test/l/l.factor @@ -1,4 +1,4 @@ -IN: vocabs.loader.test.l -USE: kernel +in: vocabs.loader.test.l +use: kernel "Oops" throw diff --git a/core/vocabs/loader/test/m/m.factor b/core/vocabs/loader/test/m/m.factor index cd35d83e4f..3ed4a375a7 100644 --- a/core/vocabs/loader/test/m/m.factor +++ b/core/vocabs/loader/test/m/m.factor @@ -1,5 +1,5 @@ -USE: vocabs.loader -IN: vocabs.loader.test.m +use: vocabs.loader +in: vocabs.loader.test.m { "vocabs.loader.test.o" "vocabs.loader.test.m" } "vocabs.loader.test.n" require-when diff --git a/core/vocabs/loader/test/n/n.factor b/core/vocabs/loader/test/n/n.factor index b3cedb3006..9913a82de1 100644 --- a/core/vocabs/loader/test/n/n.factor +++ b/core/vocabs/loader/test/n/n.factor @@ -1 +1 @@ -IN: vocabs.loader.test.n +in: vocabs.loader.test.n diff --git a/core/vocabs/loader/test/o/o.factor b/core/vocabs/loader/test/o/o.factor index cc8051ab38..9f8f0a853c 100644 --- a/core/vocabs/loader/test/o/o.factor +++ b/core/vocabs/loader/test/o/o.factor @@ -1 +1 @@ -IN: vocabs.loader.test.o +in: vocabs.loader.test.o diff --git a/core/vocabs/loader/test/p/p.factor b/core/vocabs/loader/test/p/p.factor index 3c5ba33aed..6c90930456 100644 --- a/core/vocabs/loader/test/p/p.factor +++ b/core/vocabs/loader/test/p/p.factor @@ -1,2 +1,2 @@ -IN: vocabs.loader.test.p +in: vocabs.loader.test.p : foo ( -- ) ; diff --git a/core/vocabs/parser/parser-docs.factor b/core/vocabs/parser/parser-docs.factor index 85f5614823..9a66b1925f 100644 --- a/core/vocabs/parser/parser-docs.factor +++ b/core/vocabs/parser/parser-docs.factor @@ -1,6 +1,6 @@ USING: assocs continuations help.markup help.syntax parser sequences strings words vocabs ; -IN: vocabs.parser +in: vocabs.parser ARTICLE: "word-search-errors" "Word lookup errors" "If the parser cannot not find a word in the current vocabulary search path, it attempts to look for the word in all loaded vocabularies." diff --git a/core/vocabs/parser/parser-tests.factor b/core/vocabs/parser/parser-tests.factor index 8d91e2d288..42a51c6c15 100644 --- a/core/vocabs/parser/parser-tests.factor +++ b/core/vocabs/parser/parser-tests.factor @@ -1,6 +1,6 @@ USING: accessors compiler.units definitions eval kernel tools.test vocabs vocabs.parser words ; -IN: vocabs.parser.tests +in: vocabs.parser.tests [ "FROM: kernel => doesnotexist ;" eval( -- ) ] [ error>> T{ no-word-in-vocab { word "doesnotexist" } { vocab "kernel" } } = ] diff --git a/core/vocabs/parser/parser.factor b/core/vocabs/parser/parser.factor index a8e7e12a70..5847b97f15 100644 --- a/core/vocabs/parser/parser.factor +++ b/core/vocabs/parser/parser.factor @@ -5,7 +5,7 @@ USING: accessors arrays assocs combinators compiler.units continuations hash-sets hashtables kernel math namespaces parser.notes sequences sets sorting splitting vectors vocabs words ; -IN: vocabs.parser +in: vocabs.parser ERROR: no-word-error name ; diff --git a/core/vocabs/vocabs-docs.factor b/core/vocabs/vocabs-docs.factor index ae53ed59e2..130ce42273 100644 --- a/core/vocabs/vocabs-docs.factor +++ b/core/vocabs/vocabs-docs.factor @@ -1,6 +1,6 @@ USING: help.markup help.syntax strings words compiler.units vocabs.loader assocs ; -IN: vocabs +in: vocabs ARTICLE: "vocabularies" "Vocabularies" "A " { $emphasis "vocabulary" } " is a named collection of " { $link "words" } ". Vocabularies are defined in the " { $vocab-link "vocabs" } " vocabulary." diff --git a/core/vocabs/vocabs.factor b/core/vocabs/vocabs.factor index b47053071f..270a47db41 100644 --- a/core/vocabs/vocabs.factor +++ b/core/vocabs/vocabs.factor @@ -2,9 +2,9 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors assocs definitions kernel namespaces sequences sorting splitting strings ; -IN: vocabs +in: vocabs -SYMBOL: dictionary +symbol: dictionary TUPLE: vocab < identity-tuple name words @@ -12,9 +12,9 @@ main help source-loaded? docs-loaded? ; ! sources-loaded? slot is one of these three -SYMBOL: +parsing+ -SYMBOL: +running+ -SYMBOL: +done+ +symbol: +parsing+ +symbol: +running+ +symbol: +done+ : ( name -- vocab ) vocab new @@ -71,7 +71,7 @@ M: object vocab-main lookup-vocab vocab-main ; M: f vocab-main ; -SYMBOL: vocab-observers +symbol: vocab-observers GENERIC: vocab-changed ( vocab obj -- ) @@ -132,7 +132,7 @@ M: object >vocab-link dup lookup-vocab [ ] [ ] ?if ; M: vocab-spec forget* forget-vocab ; -SYMBOL: require-hook +symbol: require-hook PREDICATE: runnable-vocab < vocab vocab-main >boolean ; diff --git a/core/words/alias/alias-docs.factor b/core/words/alias/alias-docs.factor index 2575865144..2130eb9051 100644 --- a/core/words/alias/alias-docs.factor +++ b/core/words/alias/alias-docs.factor @@ -1,5 +1,5 @@ USING: help.markup help.syntax words.alias ; -IN: words.alias +in: words.alias ARTICLE: "words.alias" "Word aliasing" "There is a syntax for defining new names for existing words. This useful for C library bindings, for example in the Win32 API, where words need to be renamed for symmetry." diff --git a/core/words/alias/alias-tests.factor b/core/words/alias/alias-tests.factor index 99471e355c..ac0f1efd7e 100644 --- a/core/words/alias/alias-tests.factor +++ b/core/words/alias/alias-tests.factor @@ -1,5 +1,5 @@ USING: effects eval math tools.test ; -IN: words.alias.tests +in: words.alias.tests ALIAS: foo + { } [ "IN: words.alias.tests CONSTANT: foo 5" eval( -- ) ] unit-test diff --git a/core/words/alias/alias.factor b/core/words/alias/alias.factor index 754cda996b..3987f1a012 100644 --- a/core/words/alias/alias.factor +++ b/core/words/alias/alias.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors definitions effects kernel quotations sequences words ; -IN: words.alias +in: words.alias PREDICATE: alias < word "alias" word-prop ; diff --git a/core/words/constant/constant-docs.factor b/core/words/constant/constant-docs.factor index ef017a917d..e362262bf4 100644 --- a/core/words/constant/constant-docs.factor +++ b/core/words/constant/constant-docs.factor @@ -1,5 +1,5 @@ USING: help.markup help.syntax words.constant ; -IN: words.constant +in: words.constant ARTICLE: "words.constant" "Constants" "There is a syntax for defining words which push literals on the stack." diff --git a/core/words/constant/constant-tests.factor b/core/words/constant/constant-tests.factor index 443ebbb32e..59e142c94b 100644 --- a/core/words/constant/constant-tests.factor +++ b/core/words/constant/constant-tests.factor @@ -1,5 +1,5 @@ USING: math tools.test words.constant ; -IN: words.constant.tests +in: words.constant.tests CONSTANT: a + @@ -15,6 +15,6 @@ CONSTANT: c { 1 2 3 } { { 1 2 3 } } [ c ] unit-test -SYMBOL: foo +symbol: foo { f } [ \ foo constant? ] unit-test diff --git a/core/words/constant/constant.factor b/core/words/constant/constant.factor index 0d45bbb0fd..91cc020c69 100644 --- a/core/words/constant/constant.factor +++ b/core/words/constant/constant.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2008, 2009 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: definitions kernel quotations words ; -IN: words.constant +in: words.constant PREDICATE: constant < word "constant" word-prop >boolean ; diff --git a/core/words/symbol/symbol-docs.factor b/core/words/symbol/symbol-docs.factor index 28fc81c6f9..333c03a78b 100644 --- a/core/words/symbol/symbol-docs.factor +++ b/core/words/symbol/symbol-docs.factor @@ -1,5 +1,5 @@ USING: help.syntax help.markup words.symbol words compiler.units ; -IN: words.symbol +in: words.symbol HELP: symbol { $description "The class of symbols created by " { $link POSTPONE: SYMBOL: } "." } ; diff --git a/core/words/symbol/symbol.factor b/core/words/symbol/symbol.factor index 0d94ea5abe..96b39c2f30 100644 --- a/core/words/symbol/symbol.factor +++ b/core/words/symbol/symbol.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: accessors definitions kernel sequences words ; -IN: words.symbol +in: words.symbol PREDICATE: symbol < word [ def>> ] [ [ ] curry ] bi sequence= ; diff --git a/core/words/words-docs.factor b/core/words/words-docs.factor index 799b8a886a..e050ac84de 100644 --- a/core/words/words-docs.factor +++ b/core/words/words-docs.factor @@ -1,6 +1,6 @@ USING: classes compiler.units definitions effects help.markup help.syntax kernel parser quotations sequences strings vocabs ; -IN: words +in: words ARTICLE: "interned-words" "Looking up and creating words" "A word is said to be " { $emphasis "interned" } " if it is a member of the vocabulary named by its vocabulary slot. Otherwise, the word is " { $emphasis "uninterned" } "." diff --git a/core/words/words-tests.factor b/core/words/words-tests.factor index b1bdde27b7..12866d2000 100644 --- a/core/words/words-tests.factor +++ b/core/words/words-tests.factor @@ -1,7 +1,7 @@ USING: accessors arrays compiler.units definitions eval generic io.streams.string kernel math namespaces parser sequences tools.test vocabs words words.symbol ; -IN: words.tests +in: words.tests { 4 } [ [ @@ -45,7 +45,7 @@ H{ } clone [ { f } [ gensym gensym = ] unit-test -SYMBOL: a-symbol +symbol: a-symbol { t } [ \ a-symbol symbol? ] unit-test ! See if redefining a generic as a colon def clears some diff --git a/core/words/words.factor b/core/words/words.factor index 71126cf933..02b557a298 100644 --- a/core/words/words.factor +++ b/core/words/words.factor @@ -3,7 +3,7 @@ USING: accessors arrays assocs definitions hashtables kernel kernel.private math math.order namespaces quotations sequences slots.private strings vocabs ; -IN: words +in: words BUILTIN: word { hashcode fixnum initial: 0 } name vocabulary @@ -87,7 +87,7 @@ ERROR: invalid-primitive vocabulary word effect ; : target-word ( word -- target ) [ name>> ] [ vocabulary>> ] bi lookup-word ; -SYMBOL: bootstrapping? +symbol: bootstrapping? : if-bootstrapping ( true false -- ) [ bootstrapping? get ] 2dip if ; inline