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:
parent
7398e1cf4e
commit
df2fbfe060
@ -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{..} =
|
||||
|
Loading…
Reference in New Issue
Block a user