aboutsummaryrefslogtreecommitdiffstats
path: root/alv
diff options
context:
space:
mode:
authors-ol <s+removethis@s-ol.nu>2022-02-05 10:11:13 +0000
committers-ol <s+removethis@s-ol.nu>2025-03-02 14:24:49 +0000
commitc484cce5ab1f6acd14ecad30adb586a6d5fa0fd1 (patch)
treea45c702a83e150fea5b14b279e5f0cab9b65bc3e /alv
parentexamples: more smoothing in love example :) (diff)
downloadalive-c484cce5ab1f6acd14ecad30adb586a6d5fa0fd1.tar.gz
alive-c484cce5ab1f6acd14ecad30adb586a6d5fa0fd1.zip
rearrange spec, fix for Lua 5.1
Diffstat (limited to 'alv')
-rw-r--r--alv/result/const.moon7
-rw-r--r--alv/result/sig.moon4
2 files changed, 4 insertions, 7 deletions
diff --git a/alv/result/const.moon b/alv/result/const.moon
index bace973..48c79f1 100644
--- a/alv/result/const.moon
+++ b/alv/result/const.moon
@@ -42,11 +42,6 @@ class Constant extends Result
--- alias for `unwrap`.
__call: (...) => @unwrap ...
- --- compare two values.
- --
- -- Compares two `SigStream`s by comparing their types and their Lua values.
- __eq: (other) => other.type == @type and @type\eq other.value, @value
-
--- Result metatype.
-- @tfield string metatype (`=`)
metatype: '='
@@ -186,6 +181,8 @@ class Constant extends Result
with Constant.wrap args.value
.meta = args.meta if args.meta
+ :__eq
+
{
:Constant
}
diff --git a/alv/result/sig.moon b/alv/result/sig.moon
index 7e9582f..519ef06 100644
--- a/alv/result/sig.moon
+++ b/alv/result/sig.moon
@@ -67,8 +67,6 @@ class SigStream extends Result
@value = value
@updated = COPILOT.T
- :__eq
-
--- the wrapped Lua value.
-- @tfield any value
@@ -82,6 +80,8 @@ class SigStream extends Result
-- @tparam ?any value the Lua value to be accessed through `unwrap`
new: (type, @value) => super type
+ :__eq
+
{
:SigStream
}