diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2016-06-05 20:53:33 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2016-06-05 20:53:33 +0200 |
commit | b0460c33fe676912b88de09f49956a4adf5c9752 (patch) | |
tree | 0c87b954d07a5b21d49d018cdf638b019057d30d /src | |
parent | 57f3d1b269a293c5a4cc3b74c3d349b093cf0298 (diff) | |
download | 2017-01-16_17:13:37-b0460c33fe676912b88de09f49956a4adf5c9752.tar 2017-01-16_17:13:37-b0460c33fe676912b88de09f49956a4adf5c9752.tar.gz 2017-01-16_17:13:37-b0460c33fe676912b88de09f49956a4adf5c9752.tar.bz2 2017-01-16_17:13:37-b0460c33fe676912b88de09f49956a4adf5c9752.tar.xz 2017-01-16_17:13:37-b0460c33fe676912b88de09f49956a4adf5c9752.zip |
cleanup
Diffstat (limited to 'src')
-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 |