From a736c1e7b727876b0b05f0b413e2c914437df13a Mon Sep 17 00:00:00 2001 From: Mirek Kratochvil Date: Sat, 12 Nov 2022 18:45:13 +0100 Subject: compiled vars carry ids --- app/Code.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/Code.hs') 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 -- cgit v1.2.3