mirror of
https://github.com/Mesabloo/diagnose.git
synced 2024-09-11 11:26:56 +03:00
Add docs to Warn and Err patterns
This commit is contained in:
parent
2ac7dd331b
commit
9e3f65b925
@ -75,9 +75,14 @@ data Report msg
|
|||||||
[Note msg]
|
[Note msg]
|
||||||
-- ^ A list of notes to add at the end of the report.
|
-- ^ A list of notes to add at the end of the report.
|
||||||
|
|
||||||
pattern Warn, Err :: Maybe msg -> msg -> [(Position, Marker msg)] -> [Note msg] -> Report msg
|
-- | Pattern synonym for a warning report.
|
||||||
|
pattern Warn :: Maybe msg -> msg -> [(Position, Marker msg)] -> [Note msg] -> Report msg
|
||||||
pattern Warn errCode msg reports notes = Report False errCode msg reports notes
|
pattern Warn errCode msg reports notes = Report False errCode msg reports notes
|
||||||
|
|
||||||
|
-- | Pattern synonym for an error report.
|
||||||
|
pattern Err :: Maybe msg -> msg -> [(Position, Marker msg)] -> [Note msg] -> Report msg
|
||||||
pattern Err errCode msg reports notes = Report True errCode msg reports notes
|
pattern Err errCode msg reports notes = Report True errCode msg reports notes
|
||||||
|
|
||||||
{-# COMPLETE Warn, Err #-}
|
{-# COMPLETE Warn, Err #-}
|
||||||
|
|
||||||
instance Semigroup msg => Semigroup (Report msg) where
|
instance Semigroup msg => Semigroup (Report msg) where
|
||||||
|
Loading…
Reference in New Issue
Block a user