mirror of
https://github.com/github/semantic.git
synced 2024-12-14 17:31:48 +03:00
Add missing cases to ScopeError’s Eq1 instance.
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
This commit is contained in:
parent
f95b06a3b4
commit
87a4f2574b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user