diff options
Diffstat (limited to 'src/Sequence')
-rw-r--r-- | src/Sequence/Formula.hs | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/Sequence/Formula.hs b/src/Sequence/Formula.hs index e860c53..0d99fc0 100644 --- a/src/Sequence/Formula.hs +++ b/src/Sequence/Formula.hs | |||
@@ -83,16 +83,6 @@ val answer prompt keepResult = do | |||
83 | gets (Set.member prompt) >>= bool (modify $ Set.insert prompt) (modify (Set.delete 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) | ||
87 | -- viewL lTrav = iso asL asS | ||
88 | -- where | ||
89 | -- asL small = join $ lift . withExceptT (\Question{..} -> Question{ answer = lTrav . answer . viewL lTrav, .. }) . runReaderT small <$> view lTrav | ||
90 | -- asS :: FormulaM lInput a -> FormulaM sInput a | ||
91 | -- asS large = undefined | ||
92 | |||
93 | -- val' :: Integral a => Lens' lInput sInput -> Traversal' sInput (FormulaM sInput Int) -> String -> Bool -> FormulaM lInput Int | ||
94 | -- val' lTrav sTrav prompt keepResult = preview (lTrav . sTrav . viewL lTrav) >>= maybe (throwError Question{ answer = lTrav . sTrav . viewL lTrav, ..}) id | ||
95 | |||
96 | d, z :: Integral a => Int -> FormulaM input a | 86 | d, z :: Integral a => Int -> FormulaM input a |
97 | d n = liftBase . fmap fromIntegral $ D.d n | 87 | d n = liftBase . fmap fromIntegral $ D.d n |
98 | z n = liftBase . fmap fromIntegral $ D.z n | 88 | z n = liftBase . fmap fromIntegral $ D.z n |