summaryrefslogtreecommitdiff
path: root/DSL/Interpretation.hs
diff options
context:
space:
mode:
authorMatthew Hall <hallmatthew314@gmail.com>2023-02-23 23:05:54 +1300
committerMatthew Hall <hallmatthew314@gmail.com>2023-02-23 23:05:54 +1300
commit1c2e8f59960c18b5e5794fba214a3f0906fb074d (patch)
tree0c1d1a421ad50b5d704d512a328e13aa693deefa /DSL/Interpretation.hs
parent06692c8e1754ac8d5d671160b839723e3610fcf1 (diff)
Parsing overhaul (slightly better errors)
Diffstat (limited to 'DSL/Interpretation.hs')
-rw-r--r--DSL/Interpretation.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/DSL/Interpretation.hs b/DSL/Interpretation.hs
index d9c53bd..82a8ef2 100644
--- a/DSL/Interpretation.hs
+++ b/DSL/Interpretation.hs
@@ -98,8 +98,8 @@ evalBlocks (BWhile c b:bs) m = applyWhile c b m >>= evalBlocks bs
interpret :: ProcTable -> IO ()
interpret t = case mergeProcTables stdlib t of
- Nothing -> putStrLn "Failed to include stdlib, duplicate proc definition?"
- Just t' -> case M.lookup entrypoint t' of
+ Left e -> putStrLn e
+ Right t' -> case M.lookup entrypoint t' of
Nothing -> putStrLn "No MAIN proc defined, aborting."
Just b -> () <$ evalBlocks b newMachine{ pTable=t' }