Copyright | (c) Edward Kmett 2011-2019 |
---|---|
License | BSD3 |
Maintainer | ekmett@gmail.com |
Stability | experimental |
Portability | non-portable |
Safe Haskell | Safe-Inferred |
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 {}
- class HasErr c where
- class Errable m where
- data ErrInfo = ErrInfo {
- _errDoc :: Doc AnsiStyle
- _errDeltas :: [Delta]
- explain :: Rendering -> Err -> Doc AnsiStyle
- failed :: String -> Err
Parse Results
The result of parsing. Either we succeeded or something went wrong.
Instances
Foldable Result Source # | |
Defined in Text.Trifecta.Result fold :: Monoid m => Result m -> m # foldMap :: Monoid m => (a -> m) -> Result a -> 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 # | |
Applicative Result Source # | |
Functor Result Source # | |
Monad Result Source # | |
Show a => Show (Result a) Source # | |
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.