From 0092723895da4136a68f71f34a816b33586d9ccb Mon Sep 17 00:00:00 2001 From: Mirek Kratochvil Date: Sun, 26 Feb 2023 21:43:25 +0100 Subject: microlens and an ugly parse of ,(something,something) btw we triggered a ghc bug here with iscallTok in parser. Apparently it kills `call` for whichever reason. New ghc solved it. --- app/Builtins.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/Builtins.hs') diff --git a/app/Builtins.hs b/app/Builtins.hs index b38eaf0..357c490 100644 --- a/app/Builtins.hs +++ b/app/Builtins.hs @@ -15,7 +15,7 @@ import Env (PrlgEnv(..), findAtom, findStruct, prlgError) import Heap (Dereferenced(..), derefHeap, heapStruct, newHeapVars) import qualified IR import Interpreter (backtrack) -import Lens.Family2.State +import Lens.Micro.Mtl import Load (processInput) import qualified Operators as O import System.Console.Haskeline (getInputChar, outputStr, outputStrLn) @@ -50,7 +50,7 @@ printLocals = do promptRetry :: InterpFn promptRetry = do - last <- cho `uses` null + last <- null <$> use cho if last then continue else promptRetry' @@ -407,7 +407,7 @@ addPrelude = do , U (Struct s) -- expand_something(Arg1, Arg2). , U (LocalRef 0) , U (LocalRef 1) - , Cut -- TODO check that the cut works here; this was the whole reason why we migrated off vienna + , Cut , Done ] , [U (LocalRef 0), U (LocalRef 0), Done] -- cgit v1.2.3