fix small bug

This commit is contained in:
Mesabloo 2022-08-05 15:17:25 +02:00
parent c9114b0634
commit f8badb4d8c
3 changed files with 4 additions and 4 deletions

View File

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

View File

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

View File

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