1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 01:47:01 +03:00

Add Show1 BaseError instance

This commit is contained in:
Rick Winfrey 2018-08-03 16:58:51 -07:00
parent 0e1722d4fd
commit eee582a1f1

View File

@ -8,6 +8,7 @@ where
import qualified Data.Abstract.Module as M
import qualified Data.Span as S
import Prologue
data BaseError (exc :: * -> *) resume = BaseError { errorContext :: ErrorContext, err :: exc resume } deriving (Show)
@ -29,3 +30,7 @@ instance Show ErrorContext where
startCol = show (S.posColumn (S.spanStart span))
endCol = show (S.posColumn (S.spanEnd span))
in startLine <> ":" <> startCol <> "-" <> endLine <> ":" <> endCol
instance Show1 (BaseError exc) where
liftShowsPrec sp sl d = liftShowsPrec sp sl d