Copyright | (c) Mesabloo 2021-2022 |
---|---|
License | BSD3 |
Stability | experimental |
Portability | Portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
Re-exports
A note is a piece of information that is found at the end of a report.
Note msg | A note, which is meant to give valuable information related to the encountered error. |
Hint msg | A hint, to propose potential fixes or help towards fixing the issue. |
Instances
Foldable Note Source # | |
Defined in Error.Diagnose.Report.Internal fold :: Monoid m => Note m -> m Source # foldMap :: Monoid m => (a -> m) -> Note a -> m Source # foldMap' :: Monoid m => (a -> m) -> Note a -> m Source # foldr :: (a -> b -> b) -> b -> Note a -> b Source # foldr' :: (a -> b -> b) -> b -> Note a -> b Source # foldl :: (b -> a -> b) -> b -> Note a -> b Source # foldl' :: (b -> a -> b) -> b -> Note a -> b Source # foldr1 :: (a -> a -> a) -> Note a -> a Source # foldl1 :: (a -> a -> a) -> Note a -> a Source # toList :: Note a -> [a] Source # null :: Note a -> Bool Source # length :: Note a -> Int Source # elem :: Eq a => a -> Note a -> Bool Source # maximum :: Ord a => Note a -> a Source # minimum :: Ord a => Note a -> a Source # | |
Traversable Note Source # | |
Functor Note Source # | |
ToJSON msg => ToJSON (Note msg) Source # | |
IsString msg => IsString (Note msg) Source # | Constructs a |
Defined in Error.Diagnose.Report.Internal fromString :: String -> Note msg Source # | |
Show msg => Show (Note msg) Source # | |
Eq msg => Eq (Note msg) Source # | |
Ord msg => Ord (Note msg) Source # | |
Defined in Error.Diagnose.Report.Internal |
The type of markers with abstract message type, shown under code lines.
This msg | A red or yellow marker under source code, marking important parts of the code. |
Where msg | A blue marker symbolizing additional information. |
Maybe msg | A magenta marker to report potential fixes. |
Blank | An empty marker, whose sole purpose is to include a line of code in the report without markers under. |
Instances
data Report msg where Source #
The type of diagnostic reports with abstract message type.
pattern Warn :: Maybe msg -> msg -> [(Position, Marker msg)] -> [Note msg] -> Report msg | Pattern synonym for a warning report. |
pattern Err :: Maybe msg -> msg -> [(Position, Marker msg)] -> [Note msg] -> Report msg | Pattern synonym for an error report. |
Instances
Foldable Report Source # | |
Defined in Error.Diagnose.Report.Internal fold :: Monoid m => Report m -> m Source # foldMap :: Monoid m => (a -> m) -> Report a -> m Source # foldMap' :: Monoid m => (a -> m) -> Report a -> m Source # foldr :: (a -> b -> b) -> b -> Report a -> b Source # foldr' :: (a -> b -> b) -> b -> Report a -> b Source # foldl :: (b -> a -> b) -> b -> Report a -> b Source # foldl' :: (b -> a -> b) -> b -> Report a -> b Source # foldr1 :: (a -> a -> a) -> Report a -> a Source # foldl1 :: (a -> a -> a) -> Report a -> a Source # toList :: Report a -> [a] Source # null :: Report a -> Bool Source # length :: Report a -> Int Source # elem :: Eq a => a -> Report a -> Bool Source # maximum :: Ord a => Report a -> a Source # minimum :: Ord a => Report a -> a Source # | |
Traversable Report Source # | |
Defined in Error.Diagnose.Report.Internal | |
Functor Report Source # | |
ToJSON msg => ToJSON (Report msg) Source # | |
Monoid msg => Monoid (Report msg) Source # | |
Semigroup msg => Semigroup (Report msg) Source # | |
warningToError :: Report msg -> Report msg Source #
Transforms a warning report into an error report.
errorToWarning :: Report msg -> Report msg Source #
Transforms an error report into a warning report.