mirror of
https://github.com/github/semantic.git
synced 2024-12-19 12:51:52 +03:00
Define a helper to construct ModuleInfo from a SrcLoc.
This commit is contained in:
parent
5c3543e61f
commit
22bb253a3c
@ -3,9 +3,11 @@ module Data.Abstract.Module
|
||||
, moduleForBlob
|
||||
, ModulePath
|
||||
, ModuleInfo(..)
|
||||
, moduleInfoFromSrcLoc
|
||||
) where
|
||||
|
||||
import Data.Blob
|
||||
import GHC.Stack
|
||||
import Prologue
|
||||
import System.FilePath.Posix
|
||||
|
||||
@ -30,3 +32,6 @@ type ModulePath = FilePath
|
||||
|
||||
newtype ModuleInfo = ModuleInfo { modulePath :: ModulePath }
|
||||
deriving (Eq, Ord, Show)
|
||||
|
||||
moduleInfoFromSrcLoc :: SrcLoc -> ModuleInfo
|
||||
moduleInfoFromSrcLoc = ModuleInfo . srcLocModule
|
||||
|
Loading…
Reference in New Issue
Block a user