From 81df52f6565c073f9638108a66304d0ecc6cac02 Mon Sep 17 00:00:00 2001 From: Mirek Kratochvil Date: Sat, 25 Feb 2023 22:35:59 +0100 Subject: get lensy and classy --- app/Compiler.hs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'app/Compiler.hs') 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 -- cgit v1.2.3