@@ -1,13 +1,5 @@
1module Main where
1module Main where
5−import Control.Monad.Ether
6−import Control.Ether.Abbr
8−import qualified Control.Monad.Reader as T
9−import qualified Control.Monad.State as T
11import Test.Tasty
3import Test.Tasty
13import Regression.T1
5import Regression.T1
@@ -19,9 +11,6 @@ import Regression.T6
19import Regression.T7
11import Regression.T7
20import Regression.T8
12import Regression.T8
25main :: IO ()
14main :: IO ()
26main = defaultMain suite
15main = defaultMain suite
@@ -36,40 +25,3 @@ suite = testGroup "Ether"
40−wrapState_f :: T.MonadState Int m => m String
41−wrapState_f = liftM show T.get
43−wrapState_g :: T.MonadState Bool m => m String
44−wrapState_g = liftM show T.get
46−wrapState_useboth :: Ether '[Foo <-> Int, Bar <-> Bool] m => m String
47−wrapState_useboth = do
48− a <- tagAttach foo wrapState_f
49− b <- tagAttach bar wrapState_g
52−wrapStateCore :: Int -> Bool -> String
53−wrapStateCore int bool = evalState foo (evalStateT bar wrapState_useboth bool) int
55−wrapStateBad1_g :: MonadState Foo Int m => m ()
56−wrapStateBad1_g = modify foo (*100)
58−wrapStateBad1_useboth :: MonadState Foo Int m => m String
59−wrapStateBad1_useboth = do
61− tagAttach foo wrapState_f
63−wrapStateBad1 :: Int -> String
64−wrapStateBad1 = evalState foo wrapStateBad1_useboth
66−wrapStateBad2 :: (T.MonadState Int m , MonadState Foo Int m) => m Int
71−wrapStateBad2Core :: Int -> Int
72−wrapStateBad2Core = evalState foo (tagAttach foo wrapStateBad2)
74−wrapReaderCore :: Int -> Int
75−wrapReaderCore = runReader foo (tagAttach foo (liftM2 (+) T.ask (ask foo)))