summaryrefslogtreecommitdiff
path: root/app/Compiler.hs
diff options
context:
space:
mode:
authorMirek Kratochvil <exa.exa@gmail.com>2023-02-25 22:35:59 +0100
committerMirek Kratochvil <exa.exa@gmail.com>2023-02-25 22:35:59 +0100
commit81df52f6565c073f9638108a66304d0ecc6cac02 (patch)
tree6fd48069777d403177de923183afa6d8ca40349d /app/Compiler.hs
parent3eb6125609245c6588df2cacc3102b8e78093ea5 (diff)
downloadprlg-81df52f6565c073f9638108a66304d0ecc6cac02.tar.gz
prlg-81df52f6565c073f9638108a66304d0ecc6cac02.tar.bz2
get lensy and classy
Diffstat (limited to 'app/Compiler.hs')
-rw-r--r--app/Compiler.hs7
1 files changed, 1 insertions, 6 deletions
diff --git a/app/Compiler.hs b/app/Compiler.hs
index 849afdb..749ecdb 100644
--- a/app/Compiler.hs
+++ b/app/Compiler.hs
@@ -74,12 +74,7 @@ compileArg (VarI x _) = [U (LocalRef x)]
compileArg (VoidI) = [U VoidRef]
seqGoals :: [Code] -> Code
-seqGoals [] = [NoGoal]
-seqGoals [[Cut]] = [Cut, NoGoal]
-seqGoals [x] = [Goal] ++ x ++ [LastCall]
-seqGoals [x, [Cut]] = [Goal] ++ x ++ [LastCall, Cut]
-seqGoals ([Cut]:xs) = [Cut] ++ seqGoals xs
-seqGoals (x:xs) = [Goal] ++ x ++ [Call] ++ seqGoals xs
+seqGoals = (++ [Done]) . concat
heapStructPrlgInt :: Monad m => m PrlgInt -> Heap -> Int -> m PrlgInt
heapStructPrlgInt heaperr heap ref = heapStruct atom struct hrec heap ref