From 2f07d890433bebedc136037ad9cce2eed25b0437 Mon Sep 17 00:00:00 2001 From: Mirek Kratochvil Date: Wed, 14 Dec 2022 22:56:47 +0100 Subject: 10h vacuum cleaner sound --- 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 0556415..eecd5b6 100644 --- a/app/Code.hs +++ b/app/Code.hs @@ -12,7 +12,7 @@ data Datum = Atom Int -- unifies a constant | Struct Id -- unifies a structure with arity | VoidRef -- unifies with anything - | LocalRef Int Int -- code-local variable idx (should never occur on heap) + | LocalRef Int -- code-local variable idx (should never occur on heap) | HeapRef Int -- something further on the heap deriving (Show, Eq, Ord) @@ -36,7 +36,7 @@ data Heap = emptyHeap = Heap 1 M.empty -type Scope = M.Map Int (Int, Int) +type Scope = M.Map Int Int emptyScope :: Scope emptyScope = M.empty @@ -103,7 +103,7 @@ codeStruct :: codeStruct atom struct local rec end heap = go where go [] = ([], ) <$> end - go (U lr@(LocalRef _ _):cs) = do + go (U lr@(LocalRef _):cs) = do x <- local lr case x of Left ref -> (cs, ) <$> heapStruct atom struct rec heap ref -- cgit v1.2.3