From 9d7868431792dcd94ec71adb9f95f55ab4bf027d Mon Sep 17 00:00:00 2001 From: Mirek Kratochvil Date: Sat, 12 Nov 2022 23:25:50 +0100 Subject: reorg 1 --- app/Env.hs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'app/Env.hs') diff --git a/app/Env.hs b/app/Env.hs index 7ede4c2..ba86c9e 100644 --- a/app/Env.hs +++ b/app/Env.hs @@ -1,21 +1,13 @@ module Env where -import qualified Code +import Code (Interp (..)) import Control.Monad.IO.Class import Control.Monad.Trans.State.Lazy import qualified IR import qualified Operators import System.Console.Haskeline -data PrlgState = - PrlgState - { defs :: Code.Defs - , ops :: Operators.Ops - , strtable :: IR.StrTable - } - deriving (Show) - -type PrlgEnv a = StateT PrlgState (InputT IO) a +type PrlgEnv a = StateT Code.Interp (InputT IO) a withStrTable :: (IR.StrTable -> (IR.StrTable, a)) -> PrlgEnv a withStrTable f = do -- cgit v1.2.3