mirror of
https://github.com/github/semantic.git
synced 2024-12-14 08:25:32 +03:00
Factor the module info & span into BaseError’s Eq1 instance.
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
This commit is contained in:
parent
f2c9083708
commit
1e7c8d63f6
@ -24,7 +24,7 @@ instance (Show (exc resume)) => Show (BaseError exc resume) where
|
||||
endErrorCol = show $ S.posColumn (S.spanEnd baseErrorSpan)
|
||||
|
||||
instance (Eq1 exc) => Eq1 (BaseError exc) where
|
||||
liftEq f (BaseError _ _ exc1) (BaseError _ _ exc2) = liftEq f exc1 exc2
|
||||
liftEq f (BaseError info1 span1 exc1) (BaseError info2 span2 exc2) = info1 == info2 && span1 == span2 && liftEq f exc1 exc2
|
||||
|
||||
instance Show1 exc => Show1 (BaseError exc) where
|
||||
liftShowsPrec sl sp d (BaseError info span exc) = showParen (d > 10) $ showString "BaseError" . showChar ' ' . showsPrec 11 info . showChar ' ' . showsPrec 11 span . showChar ' ' . liftShowsPrec sl sp 11 exc
|
||||
|
Loading…
Reference in New Issue
Block a user