From f8badb4d8c11034c52cf7af6cec2879406cea4ed Mon Sep 17 00:00:00 2001 From: Mesabloo <22964017+Mesabloo@users.noreply.github.com> Date: Fri, 5 Aug 2022 15:17:25 +0200 Subject: [PATCH] fix small bug --- diagnose.cabal | 2 +- package.yaml | 2 +- src/Error/Diagnose/Diagnostic/Internal.hs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/diagnose.cabal b/diagnose.cabal index 3ea538a..fedb2b4 100644 --- a/diagnose.cabal +++ b/diagnose.cabal @@ -5,7 +5,7 @@ cabal-version: 1.12 -- see: https://github.com/sol/hpack name: diagnose -version: 2.3.0 +version: 2.3.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. diff --git a/package.yaml b/package.yaml index 0b04372..a33915d 100644 --- a/package.yaml +++ b/package.yaml @@ -1,5 +1,5 @@ name: diagnose -version: 2.3.0 +version: 2.3.1 github: "mesabloo/diagnose" license: BSD3 author: "Ghilain Bergeron" diff --git a/src/Error/Diagnose/Diagnostic/Internal.hs b/src/Error/Diagnose/Diagnostic/Internal.hs index 80fa1e9..407fe82 100644 --- a/src/Error/Diagnose/Diagnostic/Internal.hs +++ b/src/Error/Diagnose/Diagnostic/Internal.hs @@ -69,8 +69,8 @@ instance ToJSON msg => ToJSON (Diagnostic msg) where -- | Checks whether the given diagnostic has any report or not (if it is effectively empty). hasReports :: Diagnostic msg -> Bool -hasReports (Diagnostic DL.Nil _) = True -hasReports _ = False +hasReports (Diagnostic DL.Nil _) = False +hasReports _ = True -- | Transforms every warning report in this diagnostic into an error report. warningsToErrors :: Diagnostic msg -> Diagnostic msg