From 2de6cede93912457babc79bcb0f58c9e6b20f05a Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Sun, 24 Mar 2024 11:19:48 +0100 Subject: Partially working type checker --- src/HSVIS/Diagnostic.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/HSVIS/Diagnostic.hs') diff --git a/src/HSVIS/Diagnostic.hs b/src/HSVIS/Diagnostic.hs index 778fe34..116e4cd 100644 --- a/src/HSVIS/Diagnostic.hs +++ b/src/HSVIS/Diagnostic.hs @@ -45,7 +45,7 @@ printDiagnostic :: Diagnostic -> String printDiagnostic (Diagnostic sev fp rng@(Range (Pos y1 x1) (Pos y2 x2)) stk srcline msg) = let linenum = show (y1 + 1) locstr = pretty rng - ncarets | y1 == y2 = max 1 (x2 - x1 + 1) + ncarets | y1 == y2 = max 1 (x2 - x1) | otherwise = length srcline - x1 caretsuffix | y1 == y2 = "" | otherwise = "..." -- cgit v1.2.3-70-g09d2