]> gitweb.factorcode.org Git - factor.git/commitdiff
changer: moving to extra for now.
authorJohn Benediktsson <mrjbq7@gmail.com>
Mon, 23 Jan 2017 18:40:55 +0000 (10:40 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 23 Jan 2017 18:40:55 +0000 (10:40 -0800)
basis/changer/authors.txt [deleted file]
basis/changer/changer-docs.factor [deleted file]
basis/changer/changer-tests.factor [deleted file]
basis/changer/changer.factor [deleted file]
extra/changer/authors.txt [new file with mode: 0644]
extra/changer/changer-docs.factor [new file with mode: 0644]
extra/changer/changer-tests.factor [new file with mode: 0644]
extra/changer/changer.factor [new file with mode: 0644]

diff --git a/basis/changer/authors.txt b/basis/changer/authors.txt
deleted file mode 100644 (file)
index 7c1b2f2..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Doug Coleman
diff --git a/basis/changer/changer-docs.factor b/basis/changer/changer-docs.factor
deleted file mode 100644 (file)
index 5fe24b9..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-! Copyright (C) 2015 Doug Coleman.
-! See http://factorcode.org/license.txt for BSD license.
-USING: help.markup help.syntax kernel quotations strings ;
-IN: changer
-
-HELP: change:
-{ $description "Syntax word for applying a quotation to a tuple slot." }
-{ $examples
-    "Change a tuple slot:"
-    { $example
-        "USING: prettyprint changer kernel math ;"
-        "IN: changer"
-        "TUPLE: nightclub count ;"
-        "T{ nightclub f 0 } [ 3 + ] change: count ."
-        "T{ nightclub { count 3 } }"
-    }
-} ;
-
-HELP: inline-changer
-{ $values
-    { "name" string }
-    { "quot'" quotation }
-}
-{ $description "A macro that takes a slot name and applies the quotation to a slot of a tuple." } ;
-
-ARTICLE: "changer" "Changer syntax"
-"The " { $vocab-link "changer" } " vocabulary defines one word to change the values of a slot of tuple objects."
-$nl
-"Syntax word to change tuple slots:"
-{ $subsections
-    POSTPONE: change:
-}
-"Macro to implement " { $link POSTPONE: change: } ":"
-{ $subsections
-    inline-changer
-} ;
-
-ABOUT: "changer"
diff --git a/basis/changer/changer-tests.factor b/basis/changer/changer-tests.factor
deleted file mode 100644 (file)
index af71640..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-! Copyright (C) 2015 Doug Coleman.
-! See http://factorcode.org/license.txt for BSD license.
-USING: changer math tools.test ;
-IN: changer.tests
-
-TUPLE: changer-tester test-slot ;
-
-{
-    T{ changer-tester f 1 }
-} [ T{ changer-tester f 0 } [ 1 + ] change: test-slot ] unit-test
-
-: change-test-slot ( obj -- obj )
-    [ 1 + ] change: test-slot ;
-
-{
-    T{ changer-tester f 1 }
-} [ T{ changer-tester f 0 } change-test-slot ] unit-test
diff --git a/basis/changer/changer.factor b/basis/changer/changer.factor
deleted file mode 100644 (file)
index 4f14da1..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-! Copyright (C) 2015 Doug Coleman.
-! See http://factorcode.org/license.txt for BSD license.
-USING: fry kernel lexer macros quotations sequences words ;
-IN: changer
-
-MACRO: inline-changer ( name -- quot' )
-    [ ">>" append ] [ ">>" prepend ] bi
-    [ "accessors" lookup-word 1quotation ] bi@
-    '[ over [ [ @ ] dip call ] dip swap @ ] ;
-
-SYNTAX: change: scan-token '[ _ inline-changer ] append! ;
diff --git a/extra/changer/authors.txt b/extra/changer/authors.txt
new file mode 100644 (file)
index 0000000..7c1b2f2
--- /dev/null
@@ -0,0 +1 @@
+Doug Coleman
diff --git a/extra/changer/changer-docs.factor b/extra/changer/changer-docs.factor
new file mode 100644 (file)
index 0000000..5fe24b9
--- /dev/null
@@ -0,0 +1,38 @@
+! Copyright (C) 2015 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: help.markup help.syntax kernel quotations strings ;
+IN: changer
+
+HELP: change:
+{ $description "Syntax word for applying a quotation to a tuple slot." }
+{ $examples
+    "Change a tuple slot:"
+    { $example
+        "USING: prettyprint changer kernel math ;"
+        "IN: changer"
+        "TUPLE: nightclub count ;"
+        "T{ nightclub f 0 } [ 3 + ] change: count ."
+        "T{ nightclub { count 3 } }"
+    }
+} ;
+
+HELP: inline-changer
+{ $values
+    { "name" string }
+    { "quot'" quotation }
+}
+{ $description "A macro that takes a slot name and applies the quotation to a slot of a tuple." } ;
+
+ARTICLE: "changer" "Changer syntax"
+"The " { $vocab-link "changer" } " vocabulary defines one word to change the values of a slot of tuple objects."
+$nl
+"Syntax word to change tuple slots:"
+{ $subsections
+    POSTPONE: change:
+}
+"Macro to implement " { $link POSTPONE: change: } ":"
+{ $subsections
+    inline-changer
+} ;
+
+ABOUT: "changer"
diff --git a/extra/changer/changer-tests.factor b/extra/changer/changer-tests.factor
new file mode 100644 (file)
index 0000000..af71640
--- /dev/null
@@ -0,0 +1,17 @@
+! Copyright (C) 2015 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: changer math tools.test ;
+IN: changer.tests
+
+TUPLE: changer-tester test-slot ;
+
+{
+    T{ changer-tester f 1 }
+} [ T{ changer-tester f 0 } [ 1 + ] change: test-slot ] unit-test
+
+: change-test-slot ( obj -- obj )
+    [ 1 + ] change: test-slot ;
+
+{
+    T{ changer-tester f 1 }
+} [ T{ changer-tester f 0 } change-test-slot ] unit-test
diff --git a/extra/changer/changer.factor b/extra/changer/changer.factor
new file mode 100644 (file)
index 0000000..4f14da1
--- /dev/null
@@ -0,0 +1,11 @@
+! Copyright (C) 2015 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: fry kernel lexer macros quotations sequences words ;
+IN: changer
+
+MACRO: inline-changer ( name -- quot' )
+    [ ">>" append ] [ ">>" prepend ] bi
+    [ "accessors" lookup-word 1quotation ] bi@
+    '[ over [ [ @ ] dip call ] dip swap @ ] ;
+
+SYNTAX: change: scan-token '[ _ inline-changer ] append! ;