Lines Matching refs:ReadM
16 ReadM(..),
183 newtype ReadM a = ReadM function
186 instance Functor ReadM where
187 fmap f (ReadM r) = ReadM (fmap f r)
189 instance Applicative ReadM where
190 pure = ReadM . pure
191 ReadM x <*> ReadM y = ReadM $ x <*> y function
193 instance Alternative ReadM where
197 instance Monad ReadM where
199 ReadM r >>= f = ReadM $ r >>= unReadM . f function
205 instance Fail.MonadFail ReadM where
208 instance MonadPlus ReadM where
209 mzero = ReadM mzero
210 mplus (ReadM x) (ReadM y) = ReadM $ mplus x y
213 readerAsk :: ReadM String
214 readerAsk = ReadM ask
217 readerAbort :: ParseError -> ReadM a
218 readerAbort = ReadM . lift . throwE
221 readerError :: String -> ReadM a
226 , crReader :: ReadM a }