summaryrefslogtreecommitdiff
path: root/DSL/StdLib.hs
diff options
context:
space:
mode:
authorMatthew Hall <hallmatthew314@gmail.com>2023-02-22 21:42:36 +1300
committerMatthew Hall <hallmatthew314@gmail.com>2023-02-22 21:42:36 +1300
commit0bde837174fcb9c17cb3adbf6bc3c7407cab10df (patch)
treeed5c1d5f6c0a7526e6c0808ebc02f19366ce4a03 /DSL/StdLib.hs
parent076364eb60b008e3ea9503049b5f0199273811cb (diff)
Proctables are now maps
Diffstat (limited to 'DSL/StdLib.hs')
-rw-r--r--DSL/StdLib.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/DSL/StdLib.hs b/DSL/StdLib.hs
index 6483433..360e139 100644
--- a/DSL/StdLib.hs
+++ b/DSL/StdLib.hs
@@ -1,16 +1,18 @@
module DSL.StdLib (stdlib) where
+import Data.Map.Strict (fromList)
+
import DSL.Types
import DSL.BaseParsers (parse, mult, chain)
import DSL.Parsing (tokenizer, procP)
-stdlib :: [ProcSpec]
+stdlib :: ProcTable
stdlib = procs
where
p = tokenizer `chain` mult procP
procs = case parse p (unlines sources) of
Nothing -> error "Failed to parse standard library"
- Just (_, ps) -> ps
+ Just (_, ps) -> fromList ps
sources :: [String]
sources = [ div'