From 0bde837174fcb9c17cb3adbf6bc3c7407cab10df Mon Sep 17 00:00:00 2001 From: Matthew Hall Date: Wed, 22 Feb 2023 21:42:36 +1300 Subject: Proctables are now maps --- DSL/StdLib.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'DSL/StdLib.hs') 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' -- cgit v1.2.1