mirror of
https://github.com/github/semantic.git
synced 2024-12-24 07:25:44 +03:00
Use fromSource here.
This commit is contained in:
parent
6af70476d0
commit
6e0d1f4fdc
@ -62,7 +62,7 @@ instance FromJSON Blob where
|
|||||||
Right pth <- fmap Path.parse (b .: "path")
|
Right pth <- fmap Path.parse (b .: "path")
|
||||||
lang <- b .: "language"
|
lang <- b .: "language"
|
||||||
let lang' = if knownLanguage lang then lang else Language.forPath pth
|
let lang' = if knownLanguage lang then lang else Language.forPath pth
|
||||||
pure (Blob src (Analysis.File.File pth (totalSpan src) lang'))
|
pure (fromSource pth lang' src)
|
||||||
|
|
||||||
nullBlob :: Blob -> Bool
|
nullBlob :: Blob -> Bool
|
||||||
nullBlob Blob{..} = Source.null blobSource
|
nullBlob Blob{..} = Source.null blobSource
|
||||||
|
Loading…
Reference in New Issue
Block a user