diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Sequence/Formula.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Sequence/Formula.hs b/src/Sequence/Formula.hs index 7fb4ccb..e860c53 100644 --- a/src/Sequence/Formula.hs +++ b/src/Sequence/Formula.hs | |||
@@ -80,7 +80,7 @@ evalFormula = evalFormula' [] | |||
80 | 80 | ||
81 | val :: Integral a => Traversal' input (Formula input) -> String -> Bool -> Formula input | 81 | val :: Integral a => Traversal' input (Formula input) -> String -> Bool -> Formula input |
82 | val answer prompt keepResult = do | 82 | val answer prompt keepResult = do |
83 | gets (Set.member prompt) >>= bool (modify $ Set.insert prompt) (throwError Question{..}) | 83 | gets (Set.member prompt) >>= bool (modify $ Set.insert prompt) (modify (Set.delete prompt) >> throwError Question{..}) |
84 | preview answer >>= maybe (throwError Question{..}) id | 84 | preview answer >>= maybe (throwError Question{..}) id |
85 | 85 | ||
86 | -- viewL :: Lens' lInput sInput -> Prism' (FormulaM sInput a) (FormulaM lInput a) | 86 | -- viewL :: Lens' lInput sInput -> Prism' (FormulaM sInput a) (FormulaM lInput a) |