fix removal of 'def' in all modules

This commit is contained in:
Mesabloo 2023-07-05 18:12:00 +02:00
parent 2a16c8e74a
commit 0f17c071d0
4 changed files with 5 additions and 5 deletions

View File

@ -1,11 +1,11 @@
cabal-version: 1.12
-- This file has been generated from package.yaml by hpack version 0.35.0.
-- This file has been generated from package.yaml by hpack version 0.35.2.
--
-- see: https://github.com/sol/hpack
name: diagnose
version: 2.5.0
version: 2.5.1
synopsis: Beautiful error reporting done easily
description: This package provides a simple way of getting beautiful compiler/interpreter errors
using a very simple interface for the programmer.

View File

@ -1,5 +1,5 @@
name: diagnose
version: 2.4.0
version: 2.5.1
github: "mesabloo/diagnose"
license: BSD3
author: "Ghilain Bergeron"

View File

@ -47,7 +47,7 @@ diagnosticFromBundle ::
MP.ParseErrorBundle s e ->
Diagnostic msg
diagnosticFromBundle isError code msg (fromMaybe [] -> trivialHints) MP.ParseErrorBundle {..} =
foldl addReport def (toLabeledPosition <$> bundleErrors)
foldl addReport mempty (toLabeledPosition <$> bundleErrors)
where
toLabeledPosition :: MP.ParseError s e -> Report msg
toLabeledPosition error =

View File

@ -48,7 +48,7 @@ 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))
in addReport def report
in addReport mempty report
where
fromSourcePos :: PP.SourcePos -> Position
fromSourcePos pos =