Copyright | (c) Edward Kmett 2011-2015 |
---|---|
License | BSD3 |
Maintainer | ekmett@gmail.com |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
Results and Parse Errors
Synopsis
- data Result a
- class AsResult s t a b | s -> a, t -> b, s b -> t, t a -> s where
- foldResult :: (ErrInfo -> b) -> (a -> b) -> Result a -> b
- _Success :: AsResult s t a b => Prism s t a b
- _Failure :: AsResult s s a a => Prism' s ErrInfo
- data Err = Err {
- _reason :: Maybe Doc
- _footnotes :: [Doc]
- _expected :: Set String
- _finalDeltas :: [Delta]
- class HasErr c where
- class Errable m where
- data ErrInfo = ErrInfo {
- _errDoc :: Doc
- _errDeltas :: [Delta]
- explain :: Rendering -> Err -> Doc
- failed :: String -> Err
Parse Results
The result of parsing. Either we succeeded or something went wrong.
Instances
Monad Result Source # | |
Functor Result Source # | |
Applicative Result Source # | |
Foldable Result Source # | |
Defined in Text.Trifecta.Result fold :: Monoid m => Result m -> m # foldMap :: Monoid m => (a -> m) -> Result a -> m # foldr :: (a -> b -> b) -> b -> Result a -> b # foldr' :: (a -> b -> b) -> b -> Result a -> b # foldl :: (b -> a -> b) -> b -> Result a -> b # foldl' :: (b -> a -> b) -> b -> Result a -> b # foldr1 :: (a -> a -> a) -> Result a -> a # foldl1 :: (a -> a -> a) -> Result a -> a # elem :: Eq a => a -> Result a -> Bool # maximum :: Ord a => Result a -> a # minimum :: Ord a => Result a -> a # | |
Traversable Result Source # | |
Alternative Result Source # | |
Show a => Show (Result a) Source # | |
Show a => Pretty (Result a) Source # | |
Defined in Text.Trifecta.Result | |
AsResult (Result a) (Result b) a b Source # | |
Parsing Errors
This is used to report an error. What went wrong, some supplemental docs and a set of things expected at the current location. This does not, however, include the actual location.
ErrInfo | |
|