summaryrefslogtreecommitdiff
path: root/app/Code.hs
diff options
context:
space:
mode:
authorMirek Kratochvil <exa.exa@gmail.com>2022-12-14 22:56:47 +0100
committerMirek Kratochvil <exa.exa@gmail.com>2022-12-14 22:56:47 +0100
commit2f07d890433bebedc136037ad9cce2eed25b0437 (patch)
tree3c1bce09493565a4a1ae200a34d6e54f58fbe986 /app/Code.hs
parent71992db7d0e51f87934f7d9c0cf9ddbd3a8d0300 (diff)
downloadprlg-2f07d890433bebedc136037ad9cce2eed25b0437.tar.gz
prlg-2f07d890433bebedc136037ad9cce2eed25b0437.tar.bz2
10h vacuum cleaner sound
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 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