-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Lightweight parsing library based on partial functions. -- -- To be written. @package sparse @version 0.5 -- | Lightweight parsing library based on partial functions. module Data.Sparse data SparseT a b type Sparse = SparseT String asSparse :: Sparse a -> Sparse a runSparseT :: SparseT a b -> a -> Maybe b runSparseT' :: SparseT a b -> a -> Maybe (a, b) runSparse :: Sparse a -> String -> Maybe a runSparse' :: Sparse a -> String -> Maybe (String, a) -- | Consumes one input element. -- -- Fails if the predicate fails, or if there is no more input. headP :: (b -> Bool) -> SparseT [b] b -- | Consume one or more input elements. -- -- The given function receives the entire remaining input, and -- must return the number of consumed elements. -- -- Fails if the predicate return 0 or less, or if there is no more input. splitP :: ([a] -> Int) -> SparseT [a] [a] char :: Char -> Sparse Char charIs :: (Char -> Bool) -> Sparse Char string :: String -> Sparse String stringIs :: Int -> (String -> Bool) -> Sparse String optionally :: (Monad f, Alternative f) => a -> f a -> f a optionallyMaybe :: (Monad f, Alternative f) => f a -> f (Maybe a) optional :: (Monad f, Alternative f) => f a -> f () between :: Monad m => m a -> m a1 -> m b -> m b skipMany1 :: (Monad m, Alternative m) => m a -> m () skipMany :: (Monad f, Alternative f) => f a -> f () many1 :: (Monad m, Alternative m) => m a -> m [a] sepBy :: (Monad f, Alternative f) => f a1 -> f a -> f [a1] sepBy1 :: (Monad m, Alternative m) => m a1 -> m a -> m [a1] sepEndBy1 :: (Monad m, Alternative m) => m a1 -> m a -> m [a1] sepEndBy :: (Monad m, Alternative m) => m a1 -> m a -> m [a1] endBy1 :: (Monad m, Alternative m) => m a -> m a1 -> m [a] endBy :: (Monad f, Alternative f) => f a -> f a1 -> f [a] count :: Monad m => Int -> m a -> m [a] instance Semigroup (SparseT a b) instance Monoid (SparseT a b) instance Functor (SparseT a) instance Applicative (SparseT a) instance Alternative (SparseT a) instance Monad (SparseT a) instance MonadPlus (SparseT a) instance IsString (SparseT String String) instance Monoid (a ?-> b) instance Semigroup (a ?-> b) instance Alternative ((?->) r) instance Applicative ((?->) r) instance MonadPlus ((?->) r) instance Monad ((?->) r) instance Functor ((?->) r) instance Semigroup (Partial a b)