summaryrefslogtreecommitdiff
path: root/DSL/Types.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/Types.hs
parent076364eb60b008e3ea9503049b5f0199273811cb (diff)
Proctables are now maps
Diffstat (limited to 'DSL/Types.hs')
-rw-r--r--DSL/Types.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/DSL/Types.hs b/DSL/Types.hs
index 431a361..7467bfd 100644
--- a/DSL/Types.hs
+++ b/DSL/Types.hs
@@ -1,5 +1,7 @@
module DSL.Types where
+import Data.Map.Strict (Map(..))
+
import DSL.BaseParsers (Parser(..))
data StackData
@@ -65,11 +67,13 @@ data Block
type ProcSpec = (ProcName, [Block])
+type ProcTable = Map ProcName [Block]
+
type Program = [Block]
data Machine = Machine { ok :: Bool
, stack :: Stack
- , pTable :: [(ProcName, [Block])]
+ , pTable :: ProcTable
}
data TokenTag