module System.REPL.State (
get1,
get2,
get3,
get4,
get5,
get6,
get7,
get8,
)where
import Control.Arrow
import Control.Monad
import Control.Monad.State
get1 :: Monad m
=> (s -> a)
-> StateT s m a
get1 f1 = liftM f1 get
get2 :: Monad m
=> (s -> a)
-> (s -> b)
-> StateT s m (a,b)
get2 f1 f2 = liftM (f1 &&& f2) get
get3 :: Monad m
=> (s -> a)
-> (s -> b)
-> (s -> c)
-> StateT s m (a,b,c)
get3 f1 f2 f3 = liftM (\x -> (f1 x,f2 x, f3 x)) get
get4 :: Monad m
=> (s -> a)
-> (s -> b)
-> (s -> c)
-> (s -> d)
-> StateT s m (a,b,c,d)
get4 f1 f2 f3 f4 = liftM (\x -> (f1 x,f2 x, f3 x, f4 x)) get
get5 :: Monad m
=> (s -> a)
-> (s -> b)
-> (s -> c)
-> (s -> d)
-> (s -> e)
-> StateT s m (a,b,c,d,e)
get5 f1 f2 f3 f4 f5 = liftM (\x -> (f1 x,f2 x, f3 x, f4 x, f5 x)) get
get6 :: Monad m
=> (s -> a)
-> (s -> b)
-> (s -> c)
-> (s -> d)
-> (s -> e)
-> (s -> f)
-> StateT s m (a,b,c,d,e,f)
get6 f1 f2 f3 f4 f5 f6 = liftM (\x -> (f1 x,f2 x, f3 x, f4 x, f5 x, f6 x)) get
get7 :: Monad m
=> (s -> a)
-> (s -> b)
-> (s -> c)
-> (s -> d)
-> (s -> e)
-> (s -> f)
-> (s -> g)
-> StateT s m (a,b,c,d,e,f,g)
get7 f1 f2 f3 f4 f5 f6 f7 = liftM (\x -> (f1 x,f2 x, f3 x, f4 x, f5 x, f6 x, f7 x)) get
get8 :: Monad m
=> (s -> a)
-> (s -> b)
-> (s -> c)
-> (s -> d)
-> (s -> e)
-> (s -> f)
-> (s -> g)
-> (s -> h)
-> StateT s m (a,b,c,d,e,f,g,h)
get8 f1 f2 f3 f4 f5 f6 f7 f8 = liftM (\x -> (f1 x,f2 x, f3 x, f4 x, f5 x, f6 x, f7 x, f8 x)) get