Replace uses of err/warn with Err/Warn

This commit is contained in:
Luc Tielen 2022-08-14 15:28:35 +02:00
parent c88eaec6c7
commit 87240690e5
2 changed files with 2 additions and 2 deletions

View File

@ -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)]

View File

@ -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