diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2016-06-06 02:41:09 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2016-06-06 02:41:09 +0200 |
commit | 54624cecd73a0b1ae3b8c6de41808ca02b31179e (patch) | |
tree | adebeb88499749969e6f56e10ddf3347c219b3ed /src/Main.hs | |
parent | b0460c33fe676912b88de09f49956a4adf5c9752 (diff) | |
download | 2017-01-16_17:13:37-54624cecd73a0b1ae3b8c6de41808ca02b31179e.tar 2017-01-16_17:13:37-54624cecd73a0b1ae3b8c6de41808ca02b31179e.tar.gz 2017-01-16_17:13:37-54624cecd73a0b1ae3b8c6de41808ca02b31179e.tar.bz2 2017-01-16_17:13:37-54624cecd73a0b1ae3b8c6de41808ca02b31179e.tar.xz 2017-01-16_17:13:37-54624cecd73a0b1ae3b8c6de41808ca02b31179e.zip |
Evaluate formulas in arbitrarily large context
Diffstat (limited to 'src/Main.hs')
-rw-r--r-- | src/Main.hs | 6 |
1 files changed, 3 insertions, 3 deletions
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 @@ | |||
2 | 2 | ||
3 | import Control.Monad | 3 | import Control.Monad |
4 | 4 | ||
5 | import Control.Lens | 5 | import Control.Lens hiding (Context(..)) |
6 | 6 | ||
7 | import System.Console.Shell | 7 | import System.Console.Shell |
8 | import System.Console.Shell.ShellMonad | 8 | import System.Console.Shell.ShellMonad |
@@ -146,7 +146,7 @@ rollTest = withArg $ enactTest' >=> maybe (return ()) (shellPutStrLn . ppResult) | |||
146 | 146 | ||
147 | enactTest' :: (FormulaM Stats Test) -> Sh GameState (Maybe TestResult) | 147 | enactTest' :: (FormulaM Stats Test) -> Sh GameState (Maybe TestResult) |
148 | enactTest' test = withFocus' $ \focus -> do | 148 | enactTest' test = withFocus' $ \focus -> do |
149 | (newStats, result) <- evalFormula (view eStats focus) (enactTest =<< test) | 149 | (newFocus, result) <- evalFormula focus (enactTest =<< test) |
150 | gFocus'.eStats .= newStats | 150 | gFocus' .= newFocus |
151 | return result | 151 | return result |
152 | 152 | ||