summaryrefslogtreecommitdiff
path: root/app/Env.hs
diff options
context:
space:
mode:
Diffstat (limited to 'app/Env.hs')
-rw-r--r--app/Env.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/app/Env.hs b/app/Env.hs
index 03a7ce8..0b648f8 100644
--- a/app/Env.hs
+++ b/app/Env.hs
@@ -1,23 +1,23 @@
module Env where
-import Code (InterpFn, PrlgEnv)
+import Code (Id(..), InterpFn, PrlgEnv)
import CodeLens
-import qualified IR
+import IR (StrTable, strtablize)
import Lens.Micro.Mtl
-withStrTable :: (IR.StrTable -> (IR.StrTable, a)) -> Env.PrlgEnv a
+withStrTable :: (StrTable -> (StrTable, a)) -> Env.PrlgEnv a
withStrTable f = do
(st', x) <- f <$> use strtable
strtable .= st'
return x
-findStruct :: String -> Int -> Env.PrlgEnv IR.Id
+findStruct :: String -> Int -> Env.PrlgEnv Id
findStruct str arity = do
stri <- findAtom str
- return IR.Id {IR.str = stri, IR.arity = arity}
+ return Id {str = stri, arity = arity}
findAtom :: String -> Env.PrlgEnv Int
-findAtom = withStrTable . flip IR.strtablize
+findAtom = withStrTable . flip strtablize
type PrlgEnv a = Code.PrlgEnv a