diff options
author | Marvin Borner | 2024-03-02 11:21:44 +0100 |
---|---|---|
committer | Marvin Borner | 2024-03-02 11:21:44 +0100 |
commit | eff903fc61b060b6333cb60bfced95e44da000ba (patch) | |
tree | b99fb2070843ed33f4449c0c9d7777d2db337e79 /src/Helper.hs | |
parent | fe951a51daa805f1abb9a973bbe749888d8f9a83 (diff) |
Started non-outsourced optimizer
Diffstat (limited to 'src/Helper.hs')
-rw-r--r-- | src/Helper.hs | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/Helper.hs b/src/Helper.hs index a90ce94..3c1f2f2 100644 --- a/src/Helper.hs +++ b/src/Helper.hs @@ -184,23 +184,23 @@ data Instruction = Define Identifier Expression [Instruction] | Evaluate Express data ArgMode = ArgEval | ArgEvalBblc | ArgEvalBlc | ArgDumpBblc | ArgDumpBlc data Args = Args - { _argMode :: ArgMode - , _argNoTests :: Bool - , _argVerbose :: Bool - , _argOptimizeTarget :: String - , _argReducer :: String - , _argPath :: Maybe String + { _argMode :: ArgMode + , _argNoTests :: Bool + , _argVerbose :: Bool + , _argToTarget :: String + , _argReducer :: String + , _argPath :: Maybe String } data EvalConf = EvalConf - { _isRepl :: Bool - , _isVerbose :: Bool - , _evalTests :: Bool - , _nicePath :: String - , _path :: String - , _evalPaths :: [String] - , _optimizeTarget :: String - , _reducer :: String + { _isRepl :: Bool + , _isVerbose :: Bool + , _evalTests :: Bool + , _nicePath :: String + , _path :: String + , _evalPaths :: [String] + , _toTarget :: String + , _reducer :: String } newtype ExpFlags = ExpFlags @@ -225,14 +225,14 @@ newtype EnvCache = EnvCache type EvalState = S.State Environment argsToConf :: Args -> EvalConf -argsToConf args = EvalConf { _isRepl = isNothing $ _argPath args - , _isVerbose = _argVerbose args - , _evalTests = not $ _argNoTests args - , _path = path - , _nicePath = path - , _evalPaths = [] - , _optimizeTarget = _argOptimizeTarget args - , _reducer = _argReducer args +argsToConf args = EvalConf { _isRepl = isNothing $ _argPath args + , _isVerbose = _argVerbose args + , _evalTests = not $ _argNoTests args + , _path = path + , _nicePath = path + , _evalPaths = [] + , _toTarget = _argToTarget args + , _reducer = _argReducer args } where path = fromMaybe "" (_argPath args) |