mirror of
https://github.com/Mesabloo/diagnose.git
synced 2024-11-22 01:32:56 +03:00
Replace uses of err/warn with Err/Warn
This commit is contained in:
parent
c88eaec6c7
commit
87240690e5
@ -55,7 +55,7 @@ diagnosticFromBundle isError code msg (fromMaybe [] -> trivialHints) MP.ParseErr
|
||||
source = fromSourcePos (MP.pstateSourcePos pos)
|
||||
msgs = fromString @msg <$> lines (MP.parseErrorTextPretty error)
|
||||
in flip
|
||||
(if isError error then err code msg else warn code msg)
|
||||
(if isError error then Err code msg else Warn code msg)
|
||||
(errorHints error)
|
||||
if
|
||||
| [m] <- msgs -> [(source, This m)]
|
||||
|
@ -47,7 +47,7 @@ diagnosticFromParseError ::
|
||||
diagnosticFromParseError isError code msg (fromMaybe [] -> defaultHints) error =
|
||||
let pos = fromSourcePos $ PE.errorPos error
|
||||
markers = toMarkers pos $ PE.errorMessages error
|
||||
report = (if isError error then err code msg else warn code msg) markers (defaultHints <> hints (undefined :: Void))
|
||||
report = (if isError error then Err code msg else Warn code msg) markers (defaultHints <> hints (undefined :: Void))
|
||||
in addReport def report
|
||||
where
|
||||
fromSourcePos :: PP.SourcePos -> Position
|
||||
|
Loading…
Reference in New Issue
Block a user