diff --git a/src/Data/Span.hs b/src/Data/Span.hs index dd10e1e45..f9ebd2a39 100644 --- a/src/Data/Span.hs +++ b/src/Data/Span.hs @@ -22,7 +22,7 @@ data Pos = Pos { posLine :: !Int , posColumn :: !Int } - deriving (Show, Eq, Ord) + deriving (Eq, Ord) instance A.ToJSON Pos where toJSON Pos{..} = @@ -33,6 +33,10 @@ instance A.FromJSON Pos where [line, col] <- A.parseJSON arr pure $ Pos line col +instance Show Pos where + showsPrec d Pos{..} = showsBinaryWith showsPrec showsPrec "Pos" d posLine posColumn + + data Span = Span { spanStart :: Pos , spanEnd :: Pos