Lines Matching refs:ReadM
16 ReadM(..),
188 newtype ReadM a = ReadM constructor
191 instance Functor ReadM where
192 fmap f (ReadM r) = ReadM (fmap f r)
194 instance Applicative ReadM where
195 pure = ReadM . pure
196 ReadM x <*> ReadM y = ReadM $ x <*> y function
198 instance Alternative ReadM where
202 instance Monad ReadM where
204 ReadM r >>= f = ReadM $ r >>= unReadM . f function
210 instance Fail.MonadFail ReadM where
213 instance MonadPlus ReadM where
214 mzero = ReadM mzero
215 mplus (ReadM x) (ReadM y) = ReadM $ mplus x y
218 readerAsk :: ReadM String
219 readerAsk = ReadM ask
222 readerAbort :: ParseError -> ReadM a
223 readerAbort = ReadM . lift . throwE
226 readerError :: String -> ReadM a
231 , crReader :: ReadM a }