| Copyright | (c) Mesabloo 2021-2022 |
|---|---|
| License | BSD3 |
| Stability | experimental |
| Portability | Portable |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Error.Diagnose.Report
Contents
Description
Synopsis
Re-exports
A note is a piece of information that is found at the end of a report.
Constructors
| 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 Methods 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 # | |
Defined in Error.Diagnose.Report.Internal | |
| Functor Note Source # | |
| ToJSON msg => ToJSON (Note msg) Source # | |
| IsString msg => IsString (Note msg) Source # | Constructs a |
Defined in Error.Diagnose.Report.Internal Methods 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.
Constructors
| 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.
Bundled Patterns
| 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
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.