summaryrefslogtreecommitdiff
path: root/app/Code.hs
diff options
context:
space:
mode:
authorMirek Kratochvil <exa.exa@gmail.com>2022-11-12 18:45:13 +0100
committerMirek Kratochvil <exa.exa@gmail.com>2022-11-12 18:45:13 +0100
commita736c1e7b727876b0b05f0b413e2c914437df13a (patch)
treef625bc8f0b5f25b5c88057f8681b495aaabc0f46 /app/Code.hs
parentb9633a33182f5b381e912366273709e59f469bb9 (diff)
downloadprlg-a736c1e7b727876b0b05f0b413e2c914437df13a.tar.gz
prlg-a736c1e7b727876b0b05f0b413e2c914437df13a.tar.bz2
compiled vars carry ids
Diffstat (limited to 'app/Code.hs')
-rw-r--r--app/Code.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/Code.hs b/app/Code.hs
index 3488f0b..94e8ce3 100644
--- a/app/Code.hs
+++ b/app/Code.hs
@@ -6,9 +6,9 @@ import IR (Id(..))
data Datum
= Atom Int -- unifies a constant
| Struct Id -- unifies a structure with arity
- | VoidRef -- unifies with anything
- | LocalRef Int -- code-local variable idx (should not occur on heap)
- | HeapRef Int -- heap structure idx
+ | 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
deriving (Show, Eq, Ord)
data Instr