From 08ed4178cf7ba904a77bfb0a3312dbdbaeaf7a08 Mon Sep 17 00:00:00 2001 From: Steve Dunham Date: Mon, 9 Feb 2026 10:16:56 -0800 Subject: [PATCH] Fix FC on imports - make empty bounds the identity --- src/Lib/Common.newt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Lib/Common.newt b/src/Lib/Common.newt index 9b39ec5..6a6b654 100644 --- a/src/Lib/Common.newt +++ b/src/Lib/Common.newt @@ -15,9 +15,15 @@ record Bounds where -- FIXME we should handle overlap and out of order.. instance Add Bounds where a + b = + if empty a then b + else if empty b then a else let a' = if a.startLine < b.startLine || a.startLine == b.startLine && a.startCol < b.startCol then a else b b' = if a.endLine < b.endLine || a.endLine == b.endLine && a.endCol < b.endCol then b else a in MkBounds a'.startLine a'.startCol b'.endLine b'.endCol + where + empty : Bounds → Bool + empty (MkBounds 0 0 0 0) = True + empty _ = False instance Eq Bounds where (MkBounds sl sc el ec) == (MkBounds sl' sc' el' ec') =