A peer-to-peer stack for code collaboration
Fix rad-replicate. (#483)
Julian Arni5846032b9ff4
diff --git a/bin/rad-replicate b/bin/rad-replicateindex 093cb24..cd3f741 100755--- a/bin/rad-replicate+++ b/bin/rad-replicate@@ -3,7 +3,7 @@(load! (find-module-file! "prelude.rad"))(load! (find-module-file! "monadic/project.rad"))-(import prelude/strings '[reverse-string] :unqualified)+(import prelude/strings '[ends-with?] :unqualified)(def default-url"Default replication URL"diff --git a/docs/source/reference.rst b/docs/source/reference.rstindex 6203e56..f24a480 100644--- a/docs/source/reference.rst+++ b/docs/source/reference.rst@@ -717,6 +717,69 @@ Pattern which matches ``[:just x]``.Matches values that are members of a structure.+``prelude/bool``+----------------++Functions for dealing with truthiness and #f.++``(not x)``+~~~~~~~~~~~++True if ``x`` is ``#f``, false otherwise.++``(and x y)``+~~~~~~~~~~~~~++Returns ``y`` if ``x`` is not ``#f``, otherwise returns ``x``++``(all xs)``+~~~~~~~~~~~~++Checks that all the items of a list are truthy.++``prelude/seq``+---------------++Functions for manipulating sequences, that is lists and vectors.++``(empty? seq)``+~~~~~~~~~~~~~~~~++True if ``seq`` is empty, false otherwise.++``(seq? x)``+~~~~~~~~~~~~++Returns ``#t`` if ``x`` is a list or a vector.++``(reverse xs)``+~~~~~~~~~~~~~~~~++Returns the reversed sequence ``xs``.++``(filter pred ls)``+~~~~~~~~~~~~~~~~~~~~++Returns ``ls`` with only the elements that satisfy ``pred``.++``(take-while pred ls)``+~~~~~~~~~~~~~~~~~~~~~~~~++Returns all elements of a sequence ``ls`` until one does not satisfy+``pred``++``(starts-with? s prefix)``+~~~~~~~~~~~~~~~~~~~~~~~~~~~++Returns ``#t`` if ``prefix`` is a prefix of the sequence ``s``. Also+works for strings++``(/prefix prefix rest-pat)``+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++Matches sequences that start with ``prefix`` and bind the rest of that+sequence to ``rest-pat``. Also works for strings.+``prelude/strings``-------------------@@ -929,26 +992,6 @@ Like ``process-with-stdout!``, but returns a vecAsk for user input with a prompt.-``prelude/bool``-------------------Functions for dealing with truthiness and #f.--``(not x)``-~~~~~~~~~~~--True if ``x`` is ``#f``, false otherwise.--``(and x y)``-~~~~~~~~~~~~~--Returns ``y`` if ``x`` is not ``#f``, otherwise returns ``x``--``(all xs)``-~~~~~~~~~~~~--Checks that all the items of a list are truthy.-``prelude/exception``---------------------@@ -969,49 +1012,6 @@ The empty list.Returns a list with all integers from ``from`` to ``to``, inclusive.-``prelude/seq``------------------Functions for manipulating sequences, that is lists and vectors.--``(empty? seq)``-~~~~~~~~~~~~~~~~--True if ``seq`` is empty, false otherwise.--``(seq? x)``-~~~~~~~~~~~~--Returns ``#t`` if ``x`` is a list or a vector.--``(reverse xs)``-~~~~~~~~~~~~~~~~--Returns the reversed sequence ``xs``.--``(filter pred ls)``-~~~~~~~~~~~~~~~~~~~~--Returns ``ls`` with only the elements that satisfy ``pred``.--``(take-while pred ls)``-~~~~~~~~~~~~~~~~~~~~~~~~--Returns all elements of a sequence ``ls`` until one does not satisfy-``pred``--``(starts-with? s prefix)``-~~~~~~~~~~~~~~~~~~~~~~~~~~~--Returns ``#t`` if ``prefix`` is a prefix of the sequence ``s``. Also-works for strings--``(/prefix prefix rest-pat)``-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--Matches sequences that start with ``prefix`` and bind the rest of that-sequence to ``rest-pat``. Also works for strings.-``prelude/set``---------------diff --git a/rad/prelude.rad b/rad/prelude.radindex 15dfe3f..e9d15d1 100644--- a/rad/prelude.rad+++ b/rad/prelude.rad@@ -3,13 +3,13 @@(file-module! "prelude/basic.rad")(file-module! "prelude/patterns.rad")+(file-module! "prelude/bool.rad")+(file-module! "prelude/seq.rad")(file-module! "prelude/strings.rad")(file-module! "prelude/dict.rad")(file-module! "prelude/io.rad")-(file-module! "prelude/bool.rad")(file-module! "prelude/maybe.rad")(file-module! "prelude/exception.rad")-(file-module! "prelude/seq.rad")(file-module! "prelude/list.rad")(file-module! "prelude/set.rad")(file-module! "prelude/ref.rad")@@ -29,12 +29,12 @@(import prelude/basic :unqualified)(import prelude/patterns :unqualified)+(import prelude/bool :unqualified)+(import prelude/seq :unqualified)(import prelude/strings :as 'string)(import prelude/dict :unqualified)(import prelude/io :unqualified)-(import prelude/bool :unqualified)(import prelude/maybe :unqualified)-(import prelude/seq :unqualified)(import prelude/list :unqualified)(import prelude/ref :unqualified)(import prelude/validation :as 'validator)diff --git a/rad/prelude/machine.rad b/rad/prelude/machine.radindex 1cface5..51dff17 100644--- a/rad/prelude/machine.rad+++ b/rad/prelude/machine.rad@@ -134,9 +134,10 @@(map find-module-file!["prelude/basic.rad""prelude/patterns.rad"+ "prelude/bool.rad"+ "prelude/seq.rad""prelude/strings.rad""prelude/dict.rad"- "prelude/bool.rad""prelude/maybe.rad""prelude/list.rad""prelude/set.rad"diff --git a/rad/prelude/strings.rad b/rad/prelude/strings.radindex 71ab125..eaf9749 100644--- a/rad/prelude/strings.rad+++ b/rad/prelude/strings.rad@@ -4,6 +4,7 @@reverse-string ends-with?] }(import prelude/basic :unqualified)+(import prelude/seq :unqualified)(import prelude/patterns :unqualified)(def intercalatediff --git a/reference-doc.yaml b/reference-doc.yamlindex acd65b7..d95aef5 100644--- a/reference-doc.yaml+++ b/reference-doc.yaml@@ -134,13 +134,13 @@ primFns:modules:- prelude/basic- prelude/patterns+- prelude/bool+- prelude/seq- prelude/strings- prelude/dict- prelude/io-- prelude/bool- prelude/exception- prelude/list-- prelude/seq- prelude/set- prelude/ref- prelude/lens