anticiv-0.1.0.5: This is an IRC bot for Mafia and Resistance.

Safe HaskellNone
LanguageHaskell2010

Network.Anticiv.Masks

Documentation

class MatchMask mm l | mm -> l where Source

Methods

matchmask :: forall m. MonadAnticiv m => mm -> StateT String m (Maybe l) Source

verbosemask :: mm -> String Source

data CatchInt Source

Constructors

CatchInt 

newtype Optional a Source

Constructors

Optional a 

Instances

(MatchMask a ar, IntoMaybe ar am, Append am Nil am) => MatchMask (Optional a) am 

newtype Which a Source

Constructors

Which [a] 

Instances

(MatchMask a r, Append (Cons a Nil) r ar) => MatchMask (Which a) ar 

takeUntil :: (a -> Bool) -> [a] -> [a] Source

strEq :: [Char] -> [Char] -> Bool Source

simul :: (MonadTrans t, Monad (t m), Monad m) => (t1 -> m t2) -> (t1 -> m t3) -> t1 -> t m (t2, t3) Source

firstSeq :: Monad m => (a -> m (Maybe b)) -> [a] -> m (Maybe (a, b)) Source

trymask :: (MatchMask m r, Tuplify r t) => m -> String -> Anticiv (Maybe t) Source

(#->) :: (MatchMask m r, Tuplify r t) => m -> (t -> Anticiv ()) -> String -> Anticiv Bool infixr 8 Source

(#->>) :: (MatchMask m r, Tuplify r t) => m -> Anticiv () -> String -> Anticiv Bool infixr 8 Source

(#||) :: Monad m => m Bool -> m Bool -> m Bool infixr 7 Source

(.||) :: Monad m => (a -> m Bool) -> (a -> m Bool) -> a -> m Bool infixr 7 Source

(&) :: b -> (b -> c) -> c infixl 6 Source