From 54624cecd73a0b1ae3b8c6de41808ca02b31179e Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 6 Jun 2016 02:41:09 +0200 Subject: Evaluate formulas in arbitrarily large context --- src/Main.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Main.hs') diff --git a/src/Main.hs b/src/Main.hs index 06cc6ed..f4a863f 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -2,7 +2,7 @@ import Control.Monad -import Control.Lens +import Control.Lens hiding (Context(..)) import System.Console.Shell import System.Console.Shell.ShellMonad @@ -146,7 +146,7 @@ rollTest = withArg $ enactTest' >=> maybe (return ()) (shellPutStrLn . ppResult) enactTest' :: (FormulaM Stats Test) -> Sh GameState (Maybe TestResult) enactTest' test = withFocus' $ \focus -> do - (newStats, result) <- evalFormula (view eStats focus) (enactTest =<< test) - gFocus'.eStats .= newStats + (newFocus, result) <- evalFormula focus (enactTest =<< test) + gFocus' .= newFocus return result -- cgit v1.2.3