lib: parse helper haddocks
This commit is contained in:
		
							parent
							
								
									cfaa0501e6
								
							
						
					
					
						commit
						b03584dbce
					
				| @ -189,12 +189,12 @@ rawOptsToInputOpts rawopts = InputOpts{ | ||||
| 
 | ||||
| --- * parsing utilities | ||||
| 
 | ||||
| -- | Run a string parser with no state in the identity monad. | ||||
| -- | Run a text parser in the identity monad. See also: parseWithState. | ||||
| runTextParser, rtp :: TextParser Identity a -> Text -> Either (ParseError Char CustomErr) a | ||||
| runTextParser p t =  runParser p "" t | ||||
| rtp = runTextParser | ||||
| 
 | ||||
| -- | Run a journal parser with a null journal-parsing state. | ||||
| -- | Run a journal parser in some monad. See also: parseWithState. | ||||
| runJournalParser, rjp :: Monad m => JournalParser m a -> Text -> m (Either (ParseError Char CustomErr) a) | ||||
| runJournalParser p t = runParserT (evalStateT p mempty) "" t | ||||
| rjp = runJournalParser | ||||
|  | ||||
| @ -71,6 +71,8 @@ parsewith p = runParser p "" | ||||
| parsewithString :: Parsec e String a -> String -> Either (ParseError Char e) a | ||||
| parsewithString p = runParser p "" | ||||
| 
 | ||||
| -- | Run a stateful parser with some initial state on a text. | ||||
| -- See also: runTextParser, runJournalParser. | ||||
| parseWithState :: Monad m => st -> StateT st (ParsecT CustomErr Text m) a -> Text -> m (Either (ParseError Char CustomErr) a) | ||||
| parseWithState ctx p s = runParserT (evalStateT p ctx) "" s | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user