aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authors-ol <s-ol@users.noreply.github.com>2020-03-02 14:40:00 +0000
committers-ol <s-ol@users.noreply.github.com>2020-03-02 16:48:09 +0000
commit4ebb6f4408600f3c0f2a745b7ed0ba951bf521b3 (patch)
treecdf0953fdee07a6c83c510470a7b8ab8d832d25d /core
parentupdate lib.math and lib.logic to new op interface (diff)
downloadalive-4ebb6f4408600f3c0f2a745b7ed0ba951bf521b3.tar.gz
alive-4ebb6f4408600f3c0f2a745b7ed0ba951bf521b3.zip
lift remaining libs to new op interface
Diffstat (limited to 'core')
-rw-r--r--core/base.moon9
-rw-r--r--core/init.moon5
2 files changed, 10 insertions, 4 deletions
diff --git a/core/base.moon b/core/base.moon
index c6ea694..41ddd4c 100644
--- a/core/base.moon
+++ b/core/base.moon
@@ -27,6 +27,12 @@ class Input
cls.__base.__call = @__call
cls.__base.__tostring = @__tostring
+-- ColdInput scheduling policy
+--
+-- never marked dirty
+class ColdInput extends Input
+ dirty: => false
+
-- ValueInput scheduling policy
--
-- during setup, only marked dirty if old and new stream differ in value
@@ -210,8 +216,7 @@ class FnDef
"(fn (#{table.concat [p\stringify! for p in *@params], ' '}) ...)"
{
- :ValueInput, :EventInput, :IOInput
- :Dispatcher
+ :ValueInput, :EventInput, :IOInput, :ColdInput
:IO
:Op
:Action
diff --git a/core/init.moon b/core/init.moon
index 6b5bdd0..6a8c5d4 100644
--- a/core/init.moon
+++ b/core/init.moon
@@ -1,6 +1,6 @@
L or= setmetatable {}, __index: => ->
-import Op, IO, Action, FnDef, EventInput, ValueInput, IOInput
+import Op, IO, Action, FnDef, EventInput, ValueInput, IOInput, ColdInput
from require 'core.base'
import match from require 'core.pattern'
@@ -21,7 +21,8 @@ globals = Scope.from_table require 'core.builtin'
:Cell, :RootCell
:Op, :IO, :Action, :FnDef
- :EventInput, :ValueInput, :IOInput, :match
+ :EventInput, :ValueInput, :IOInput, :ColdInput,
+ :match
:Scope
:Registry, :Tag