aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authors-ol <s-ol@users.noreply.github.com>2020-05-21 16:16:16 +0000
committers-ol <s+removethis@s-ol.nu>2025-03-02 14:24:49 +0000
commit6023a46cb30ac788ace35632df6cd4646145db4d (patch)
treeb7a20a119667808679eaa6de234ee413cb046587
parentmove array and struct constructor into builtins (diff)
downloadalive-6023a46cb30ac788ace35632df6cd4646145db4d.tar.gz
alive-6023a46cb30ac788ace35632df6cd4646145db4d.zip
rename alv.builtin to alv.builtins
-rw-r--r--Makefile2
-rw-r--r--alv/builtins.moon (renamed from alv/builtin.moon)2
-rw-r--r--alv/init.moon2
-rw-r--r--alv/module.moon4
-rwxr-xr-xdocs/gen/index2
-rw-r--r--docs/internals/extensions.md2
6 files changed, 7 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 3c2820e..794730b 100644
--- a/Makefile
+++ b/Makefile
@@ -31,7 +31,7 @@ docs/reference/%.html: alv-lib/%.moon $(DEPS)
@mkdir -p `dirname $@`
docs/gen/module $@ alv-lib.$(subst /,.,$*) $(subst /,.,$*)
-docs/reference/index.html: alv/builtin.moon $(MODREFS) $(DEPS)
+docs/reference/index.html: alv/builtins.moon $(MODREFS) $(DEPS)
docs/gen/index $@ $(MODULES)
docs/ldoc.ltp: $(DEPS)
diff --git a/alv/builtin.moon b/alv/builtins.moon
index 7038de4..19700dc 100644
--- a/alv/builtin.moon
+++ b/alv/builtins.moon
@@ -4,7 +4,7 @@
-- Please see the [reference](../../reference/index.html#builtins) for
-- documentation.
--
--- @module builtin
+-- @module builtins
import Builtin, Op, PureOp, T, FnDef, Input, const, val, evt, Struct, Array
from require 'alv.base'
import Constant from require 'alv.result'
diff --git a/alv/init.moon b/alv/init.moon
index 26d1656..7ff3e99 100644
--- a/alv/init.moon
+++ b/alv/init.moon
@@ -27,7 +27,7 @@ import program from require 'alv.parsing'
cycle\resolve!
-globals = require 'alv.builtin'
+globals = require 'alv.builtins'
cycle\resolve!
diff --git a/alv/module.moon b/alv/module.moon
index fad08ee..d530712 100644
--- a/alv/module.moon
+++ b/alv/module.moon
@@ -6,7 +6,7 @@ import Registry from require 'alv.registry'
import Error from require 'alv.error'
import Scope from require 'alv.scope'
import program from require 'alv.parsing'
-builtin = require 'alv.builtin'
+builtins = require 'alv.builtins'
slurp = (file) ->
file = assert (io.open file, 'r'), Error 'io', "couldn't open '#{file}'"
@@ -46,7 +46,7 @@ class Module
@ast = Error.wrap "parsing '#{@file}'", -> program\match slurp @file
assert @ast, Error 'syntax', "failed to parse"
- scope = Scope builtin
+ scope = Scope builtins
@root = Error.wrap "evaluating '#{@file}'", @ast\eval, scope, @registry
--- rollback the last evaluation cycle.
diff --git a/docs/gen/index b/docs/gen/index
index 55dd1df..dff601a 100755
--- a/docs/gen/index
+++ b/docs/gen/index
@@ -43,7 +43,7 @@ spit OUT, layout
h2 a "builtins", href: '#builtins'
p "These definitions are automatically loaded into the global Scope of
every alive session."
- ul for key, val in opairs (require 'alv.builtin').values
+ ul for key, val in opairs (require 'alv.builtins').values
li render key, val.result
}
}
diff --git a/docs/internals/extensions.md b/docs/internals/extensions.md
index e541d9a..29cc075 100644
--- a/docs/internals/extensions.md
+++ b/docs/internals/extensions.md
@@ -177,7 +177,7 @@ how their arguments are evaluated. They roughly correspond to *macros* in Lisps.
There is less of a concrete guideline for implementing Builtins because there
are a lot more options, and it really depends a lot on what the Builtin should
achieve. Nevertheless, a good starting point is to read the `Builtin` class
-documentation, take a look at `Builtin`s in `alv/builtin.moon` and get
+documentation, take a look at `Builtin`s in `alv/builtins.moon` and get
familiar with the relevant internal interfaces (especially `AST`, `Result`, and
`Scope`).