From 8c33b3d2c69b6800ca34155d62c000250980e47e Mon Sep 17 00:00:00 2001 From: Matthew Hall Date: Sat, 18 Feb 2023 16:58:51 +1300 Subject: Introduce stdlib and fix lexing bug --- DSL/Interpretation.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'DSL/Interpretation.hs') diff --git a/DSL/Interpretation.hs b/DSL/Interpretation.hs index e02bc74..02105f4 100644 --- a/DSL/Interpretation.hs +++ b/DSL/Interpretation.hs @@ -5,6 +5,7 @@ import Data.Foldable (foldlM) import DSL.Types import DSL.Util import DSL.Intrinsics +import DSL.StdLib (stdlib) newMachine :: Machine newMachine = Machine { ok=True, stack=[], pTable=[] } @@ -103,5 +104,5 @@ evalBlocks (BIfElse c b1 b2:bs) m = applyIfElse c b1 b2 m >>= evalBlocks bs evalBlocks (BWhile c b:bs) m = applyWhile c b m >>= evalBlocks bs interpret :: ([ProcSpec], Program) -> IO () -interpret (t, p) = evalBlocks p newMachine{ pTable=t } >> return () +interpret (t, p) = evalBlocks p newMachine{ pTable=stdlib++t } >> return () -- cgit v1.2.1