1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 14:21:31 +03:00

Use Record WildCards for SourceSpan

This commit is contained in:
Rick Winfrey 2016-11-04 09:49:12 -05:00
parent 7398e1cf4e
commit df2fbfe060

View File

@ -28,8 +28,8 @@ data SourcePos = SourcePos
} deriving (Show, Read, Eq, Ord, Generic, Hashable)
displaySourcePos :: SourcePos -> Text
displaySourcePos sp =
"line " <> show (line sp) <> ", column " <> show (column sp)
displaySourcePos SourcePos{..} =
"line " <> show line <> ", column " <> show column
instance A.ToJSON SourcePos where
toJSON SourcePos{..} =