1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 14:21:31 +03:00
This commit is contained in:
Rob Rix 2018-03-21 20:31:18 -04:00
parent 36aa4e445c
commit 6273a22c71

View File

@ -26,5 +26,5 @@ moduleForBlob rootDir blob term = Module (moduleName blob) (blobPath blob) term
where moduleName Blob{..} | Just Go <- blobLanguage = toName (takeDirectory (modulePath blobPath))
| otherwise = toName (modulePath blobPath)
-- TODO: Need a better way to handle module registration and resolution
toName str = qualifiedName (BC.pack <$> splitWhen (== pathSeparator) str)
toName = qualifiedName . map BC.pack . splitWhen (== pathSeparator)
modulePath = dropExtensions . maybe takeFileName makeRelative rootDir