summaryrefslogtreecommitdiff
path: root/app/Interpreter.hs
diff options
context:
space:
mode:
Diffstat (limited to 'app/Interpreter.hs')
-rw-r--r--app/Interpreter.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/Interpreter.hs b/app/Interpreter.hs
index 8531a27..0107bf5 100644
--- a/app/Interpreter.hs
+++ b/app/Interpreter.hs
@@ -19,8 +19,8 @@ import qualified Data.Map as M
import Env (PrlgEnv)
import Heap
import IR (Id(..), StrTable(..))
-import Lens.Family2
-import Lens.Family2.State
+import Lens.Micro
+import Lens.Micro.Mtl
prove :: Code -> PrlgEnv (Either String Bool)
prove g = do
@@ -140,7 +140,7 @@ cutGoal = doCut >> advance
openGoal :: IR.Id -> InterpFn
openGoal fn = do
- def <- defs `uses` (M.!? fn)
+ def <- (M.!? fn) <$> use defs
case def of
Just hs@(_:_) -> do
advance
@@ -293,7 +293,7 @@ unify _ _ = backtrack
{- unification reference-handling tools -}
findLocalRef :: Lens' Cho (M.Map Int Int) -> Int -> PrlgEnv Int
findLocalRef store lr = do
- a' <- (cur . store) `uses` (M.!? lr)
+ a' <- (M.!? lr) <$> use (cur . store)
case a' of
Nothing -> do
a <- newHeapVar