From 65a094a4ee67f16ff5ed7663c2b3dd6d85c19c00 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Fri, 15 Mar 2024 17:24:22 +0100 Subject: Initial working optimization stage --- src/Eval.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Eval.hs') diff --git a/src/Eval.hs b/src/Eval.hs index d331e86..0a5e8c7 100644 --- a/src/Eval.hs +++ b/src/Eval.hs @@ -419,7 +419,7 @@ evalFileConf conf = do Nothing -> print $ ContextualError (UndefinedIdentifier entryFunction) (Context "" (_nicePath conf)) Just EnvDef { _exp = e } -> do - red <- optimizedReduce conf (Application e arg) + red <- optimizedReduce conf { _hasArg = True } (Application e arg) showResult red (Environment env) exec :: EvalConf -> (String -> IO (Either IOError a)) -> (a -> String) -> IO () @@ -429,7 +429,7 @@ exec conf rd conv = do case f of Left exception -> print (exception :: IOError) Right f' -> do - red <- optimizedReduce conf (Application e arg) + red <- optimizedReduce conf { _hasArg = True } (Application e arg) showResult red (Environment M.empty) where e = fromBinary $ conv f' -- cgit v1.2.3