mirror of
https://github.com/github/semantic.git
synced 2024-12-19 12:51:52 +03:00
📝 moduleForBlob.
This commit is contained in:
parent
7e2b8b93e4
commit
842ab3403d
@ -17,6 +17,7 @@ data Module term = Module { moduleName :: ModuleName, modulePath :: FilePath, mo
|
||||
deriving (Eq, Foldable, Functor, Ord, Show, Traversable)
|
||||
|
||||
|
||||
-- | Construct a 'Module' for a 'Blob' and @term@, relative to some root 'FilePath'.
|
||||
moduleForBlob :: FilePath -> Blob -> term -> Module term
|
||||
moduleForBlob rootDir blob term = Module (moduleName blob) (blobPath blob) term
|
||||
where moduleName Blob{..} = let path = dropExtensions (makeRelative rootDir blobPath)
|
||||
|
Loading…
Reference in New Issue
Block a user