summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorMirek Kratochvil <exa.exa@gmail.com>2023-02-18 22:50:23 +0100
committerMirek Kratochvil <exa.exa@gmail.com>2023-02-18 22:50:23 +0100
commitde4775bd772703acb02fb1c953e5207be5bc0506 (patch)
tree6bce7522b3434d80b033a5b3be2e2564334a288e /app
parentc412d643a1980f89dd7b8c2e05999ed04e3d6c26 (diff)
downloadprlg-de4775bd772703acb02fb1c953e5207be5bc0506.tar.gz
prlg-de4775bd772703acb02fb1c953e5207be5bc0506.tar.bz2
who left that here
Diffstat (limited to 'app')
-rw-r--r--app/Builtins.hs24
1 files changed, 0 insertions, 24 deletions
diff --git a/app/Builtins.hs b/app/Builtins.hs
index 8539562..b5993a2 100644
--- a/app/Builtins.hs
+++ b/app/Builtins.hs
@@ -6,7 +6,6 @@ import Code
, Code
, Datum(..)
, Dereferenced(..)
- , Heap(..)
, Instr(..)
, Interp(..)
, InterpFn
@@ -136,29 +135,6 @@ retractall =
BoundRef _ (Struct id) -> dropProcedure id >> continue
_ -> prlgError "retractall needs a struct"
-call' :: InterpFn
-call' =
- withArgs [0] $ \[arg] -> do
- heap@(Heap _ hmap) <- gets (heap . cur)
- let exec base struct arity = do
- cur <- gets cur
- modify $ \s ->
- s
- { cur =
- cur
- { gol =
- [Call, Goal, U struct] ++
- [U $ hmap M.! (base + i) | i <- [1 .. arity]] ++ gol cur
- }
- }
- continue
- case derefHeap heap arg of
- BoundRef addr struct@(Struct IR.Id {IR.arity = arity}) ->
- exec addr struct arity
- BoundRef addr (Atom a) ->
- exec addr (Struct IR.Id {IR.arity = 0, IR.str = a}) 0
- _ -> prlgError "not callable"
-
exec' :: (Code -> Code) -> InterpFn
exec' fgol =
withArgs [0] $ \[arg] -> do