From 87a4f2574bf2b198793a2a591b455a89f4383351 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Thu, 6 Dec 2018 12:58:48 -0500 Subject: [PATCH] =?UTF-8?q?Add=20missing=20cases=20to=20ScopeError?= =?UTF-8?q?=E2=80=99s=20Eq1=20instance.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Rick Winfrey --- src/Control/Abstract/ScopeGraph.hs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Control/Abstract/ScopeGraph.hs b/src/Control/Abstract/ScopeGraph.hs index 33dd4db14..d9fc4207f 100644 --- a/src/Control/Abstract/ScopeGraph.hs +++ b/src/Control/Abstract/ScopeGraph.hs @@ -247,11 +247,13 @@ deriving instance Eq (ScopeError address return) deriving instance Show (ScopeError address return) instance Show address => Show1 (ScopeError address) where liftShowsPrec _ _ = showsPrec instance Eq1 (ScopeError address) where - liftEq _ (ScopeError m1 n1) (ScopeError m2 n2) = m1 == m2 && n1 == n2 - liftEq _ CurrentScopeError CurrentScopeError = True - liftEq _ LookupScopeError LookupScopeError = True - liftEq _ (LookupPathError decl1) (LookupPathError decl2) = decl1 == decl2 - liftEq _ _ _ = False + liftEq _ (ScopeError m1 n1) (ScopeError m2 n2) = m1 == m2 && n1 == n2 + liftEq _ LookupScopeError LookupScopeError = True + liftEq _ ImportReferenceError ImportReferenceError = True + liftEq _ (LookupPathError decl1) (LookupPathError decl2) = decl1 == decl2 + liftEq _ (LookupDeclarationScopeError decl1) (LookupDeclarationScopeError decl2) = decl1 == decl2 + liftEq _ CurrentScopeError CurrentScopeError = True + liftEq _ _ _ = False alloc :: (Member (Allocator address) sig, Carrier sig m) => Name -> Evaluator term address value m address alloc = send . flip Alloc ret