summaryrefslogtreecommitdiff
path: root/app/Env.hs
diff options
context:
space:
mode:
authorMirek Kratochvil <exa.exa@gmail.com>2023-02-26 21:43:25 +0100
committerMirek Kratochvil <exa.exa@gmail.com>2023-02-26 21:43:25 +0100
commit0092723895da4136a68f71f34a816b33586d9ccb (patch)
treef2ddf1c40dda994ac645ce848f32ae3e02529445 /app/Env.hs
parent0d52bcf663ead766ae83c8f30f90beaea5790789 (diff)
downloadprlg-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/Env.hs')
-rw-r--r--app/Env.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/Env.hs b/app/Env.hs
index 592d608..03a7ce8 100644
--- a/app/Env.hs
+++ b/app/Env.hs
@@ -3,11 +3,11 @@ module Env where
import Code (InterpFn, PrlgEnv)
import CodeLens
import qualified IR
-import Lens.Family2.State
+import Lens.Micro.Mtl
withStrTable :: (IR.StrTable -> (IR.StrTable, a)) -> Env.PrlgEnv a
withStrTable f = do
- (st', x) <- strtable `uses` f
+ (st', x) <- f <$> use strtable
strtable .= st'
return x