seakale-tests-0.1.1.1: Helpers to test code using Seakale

Safe HaskellSafe
LanguageHaskell2010

Database.Seakale.Tests.Mock

Documentation

data Mock sub a Source #

Constructors

Action sub 
Or (Mock sub a) (Mock sub a) 
And (Mock sub a) (Mock sub a) 
After (Mock sub a) (Mock sub a) 
None (Maybe a) 

Instances

Monad (Mock sub) Source # 

Methods

(>>=) :: Mock sub a -> (a -> Mock sub b) -> Mock sub b #

(>>) :: Mock sub a -> Mock sub b -> Mock sub b #

return :: a -> Mock sub a #

fail :: String -> Mock sub a #

Functor (Mock sub) Source # 

Methods

fmap :: (a -> b) -> Mock sub a -> Mock sub b #

(<$) :: a -> Mock sub b -> Mock sub a #

Applicative (Mock sub) Source # 

Methods

pure :: a -> Mock sub a #

(<*>) :: Mock sub (a -> b) -> Mock sub a -> Mock sub b #

(*>) :: Mock sub a -> Mock sub b -> Mock sub b #

(<*) :: Mock sub a -> Mock sub b -> Mock sub a #

Alternative (Mock sub) Source # 

Methods

empty :: Mock sub a #

(<|>) :: Mock sub a -> Mock sub a -> Mock sub a #

some :: Mock sub a -> Mock sub [a] #

many :: Mock sub a -> Mock sub [a] #

(Eq a, Eq sub) => Eq (Mock sub a) Source # 

Methods

(==) :: Mock sub a -> Mock sub a -> Bool #

(/=) :: Mock sub a -> Mock sub a -> Bool #

(Show a, Show sub) => Show (Mock sub a) Source # 

Methods

showsPrec :: Int -> Mock sub a -> ShowS #

show :: Mock sub a -> String #

showList :: [Mock sub a] -> ShowS #

Monoid (Mock sub a) Source # 

Methods

mempty :: Mock sub a #

mappend :: Mock sub a -> Mock sub a -> Mock sub a #

mconcat :: [Mock sub a] -> Mock sub a #

Recursive (Mock sub a) Source # 

Methods

project :: Mock sub a -> Base (Mock sub a) (Mock sub a) #

cata :: (Base (Mock sub a) a -> a) -> Mock sub a -> a #

para :: (Base (Mock sub a) (Mock sub a, a) -> a) -> Mock sub a -> a #

gpara :: (Corecursive (Mock sub a), Comonad w) => (forall b. Base (Mock sub a) (w b) -> w (Base (Mock sub a) b)) -> (Base (Mock sub a) (EnvT (Mock sub a) w a) -> a) -> Mock sub a -> a #

prepro :: Corecursive (Mock sub a) => (forall b. Base (Mock sub a) b -> Base (Mock sub a) b) -> (Base (Mock sub a) a -> a) -> Mock sub a -> a #

gprepro :: (Corecursive (Mock sub a), Comonad w) => (forall b. Base (Mock sub a) (w b) -> w (Base (Mock sub a) b)) -> (forall c. Base (Mock sub a) c -> Base (Mock sub a) c) -> (Base (Mock sub a) (w a) -> a) -> Mock sub a -> a #

type Base (Mock sub a) Source # 
type Base (Mock sub a) = MockF sub

data MockF sub f Source #

Constructors

FAction sub 
FOr f f 
FAnd f f 
FAfter f f 
FNone 

Instances

Functor (MockF sub) Source # 

Methods

fmap :: (a -> b) -> MockF sub a -> MockF sub b #

(<$) :: a -> MockF sub b -> MockF sub a #

consumeMock :: (sub -> Maybe b) -> Mock sub a -> Maybe (b, Mock sub a) Source #

castMock :: Mock sub a -> Mock sub b Source #

mor :: Mock sub a -> Mock sub a -> Mock sub a Source #

mand :: Mock sub a -> Mock sub a -> Mock sub a Source #

after :: Mock sub a -> Mock sub a -> Mock sub a Source #

andThen :: Mock sub a -> Mock sub a -> Mock sub a Source #

anyOf :: [Mock sub a] -> Mock sub a Source #

allOf :: [Mock sub a] -> Mock sub a Source #

fixAfter :: Mock sub a -> Mock sub a Source #

times :: Int -> Mock sub a -> Mock sub a Source #