diff options
| author | Mirek Kratochvil <exa.exa@gmail.com> | 2022-11-15 20:30:53 +0100 |
|---|---|---|
| committer | Mirek Kratochvil <exa.exa@gmail.com> | 2022-11-15 20:30:53 +0100 |
| commit | e074e454d5f8b5bc5dc45dccab1d138c5cd4ab0c (patch) | |
| tree | 3d12a566190bdcfa1672a5a5bf69bcc79259b50c /app/Code.hs | |
| parent | 8d5353dc8c7ef3eefb0ae4860e67602c455c1a58 (diff) | |
| download | prlg-e074e454d5f8b5bc5dc45dccab1d138c5cd4ab0c.tar.gz prlg-e074e454d5f8b5bc5dc45dccab1d138c5cd4ab0c.tar.bz2 | |
ok simplify the refs back
Diffstat (limited to 'app/Code.hs')
| -rw-r--r-- | app/Code.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/Code.hs b/app/Code.hs index 5721d17..df3401e 100644 --- a/app/Code.hs +++ b/app/Code.hs @@ -9,9 +9,9 @@ import System.Console.Haskeline data Datum = Atom Int -- unifies a constant | Struct Id -- unifies a structure with arity - | VoidRef (Maybe Int) -- unifies with anything (references may refer to variable names) - | LocalRef Int (Maybe Int) -- code-local variable idx (should not occur on heap) - | HeapRef Int (Maybe Int) -- heap structure idx + | VoidRef -- unifies with anything + | LocalRef Int Int -- code-local variable idx (should never occur on heap) + | HeapRef Int -- something further on the heap deriving (Show, Eq, Ord) data Instr @@ -34,7 +34,7 @@ data Heap = emptyHeap = Heap 0 M.empty -type Scope = M.Map Int Int +type Scope = M.Map Int (Int, Int) emptyScope :: Scope emptyScope = M.empty |
