Hatena::Grouphaskell

[ pred x | x <- "Ibtlfmm!ojllj" ] RSSフィード

2008-03-16

モナド一覧 03:17

標準ライブラリをgrepしてモナドを集めてみた。

instance  Monad IIO  where
instance  Monad Maybe  where
instance (Error e) => Monad (Either e) where
instance (Monad m) => Monad (ContT r m) where
instance (Monad m) => Monad (ListT m) where
instance (Monad m) => Monad (ReaderT r m) where
instance (Monad m) => Monad (StateT s m) where
instance (Monad m, Error e) => Monad (ErrorT e m) where
instance (Monoid w) => Monad (RWS r w s) where
instance (Monoid w) => Monad (Writer w) where
instance (Monoid w, Monad m) => Monad (RWST r w s m) where
instance (Monoid w, Monad m) => Monad (WriterT w m) where
instance ArrowApply a => Monad (ArrowMonad a) where
instance Monad ((->) r) where
instance Monad (CmdLineP s) where
instance Monad (Cont r) where
instance Monad (DocM s) where
instance Monad (GUI ps) where
instance Monad (GenParser tok st) where
instance Monad (IOEnv m) where
instance Monad (IOState s) where
instance Monad (Lex r) where
instance Monad (MyEither String) where
instance Monad (P s) where
instance Monad (Parser r s) where
instance Monad (Reader r) where
instance Monad (ST s) where
instance Monad (SetM s) where
instance Monad (State s) where
instance Monad Abs where
instance Monad CM where -- Reader monad
instance Monad CheckResult where
instance Monad CmmLint where
instance Monad Draw where
instance Monad Eval where
instance Monad ExtFCode where
instance Monad Flatten where
instance Monad GHCi where
instance Monad Gen where
instance Monad HappyIdentity where
instance Monad Identity where
instance Monad NatM where
instance Monad Out where
instance Monad P where
instance Monad ParseResult where
instance Monad Parser where
instance Monad ParserM where
instance Monad PprM where
instance Monad Pure where
instance Monad Q where
instance Monad ReadP where
instance Monad ReadPrec where
instance Monad RegM where
instance Monad STM where
instance Monad Seq where
instance Monad TE where
instance Monad Tree where
instance Monad VM where
 instance Monad [::] where
instance Monad m => Monad (CGIT m) where
instance Monad m => Monad (GT m g) where
instance Monad m => Monad (StT s m) where

わりと少ない。正規表現*1が悪いのかもしれないが。

ちなみにMonadなんとかの名前のクラスはこれだけ。*2

class (Monad m) => MonadCont m where
class (Monad m) => MonadError e m | m -> e where
class (Monad m) => MonadFix m where
class (Monad m) => MonadIO m where
class (Monad m) => MonadReader r m | m -> r where
class (Monad m) => MonadState s m | m -> s where
class (Monoid w, Monad m) => MonadWriter w m | m -> w where
class (Monoid w, MonadReader r m, MonadWriter w m, MonadState s m)
class Monad m => MonadCGI m where
class Monad m => MonadEval m where
class Monad m => MonadPlus m where
class MonadTrans t where

*1:$ find ~/src/ghc-6.8.2 -name '*.hs' | xargs grep -hP '^instance.*\sMonad\s(?!.*=>)' | sort | uniq

*2:'^class.*\sMonad\S(?!.*=>)'

トラックバック - http://haskell.g.hatena.ne.jp/illillli/20080316