summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
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