diff options
| author | Mirek Kratochvil <exa.exa@gmail.com> | 2023-02-26 21:43:25 +0100 |
|---|---|---|
| committer | Mirek Kratochvil <exa.exa@gmail.com> | 2023-02-26 21:43:25 +0100 |
| commit | 0092723895da4136a68f71f34a816b33586d9ccb (patch) | |
| tree | f2ddf1c40dda994ac645ce848f32ae3e02529445 /app/Builtins.hs | |
| parent | 0d52bcf663ead766ae83c8f30f90beaea5790789 (diff) | |
| download | prlg-0092723895da4136a68f71f34a816b33586d9ccb.tar.gz prlg-0092723895da4136a68f71f34a816b33586d9ccb.tar.bz2 | |
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.
Diffstat (limited to 'app/Builtins.hs')
| -rw-r--r-- | app/Builtins.hs | 6 |
1 files changed, 3 insertions, 3 deletions
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] |
