diff options
| author | Matthew Hall <hallmatthew314@gmail.com> | 2023-02-22 21:42:36 +1300 |
|---|---|---|
| committer | Matthew Hall <hallmatthew314@gmail.com> | 2023-02-22 21:42:36 +1300 |
| commit | 0bde837174fcb9c17cb3adbf6bc3c7407cab10df (patch) | |
| tree | ed5c1d5f6c0a7526e6c0808ebc02f19366ce4a03 /DSL/StdLib.hs | |
| parent | 076364eb60b008e3ea9503049b5f0199273811cb (diff) | |
Proctables are now maps
Diffstat (limited to 'DSL/StdLib.hs')
| -rw-r--r-- | DSL/StdLib.hs | 6 |
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' |
