mirror of
https://github.com/github/semantic.git
synced 2024-12-01 00:33:59 +03:00
packageName is mandatory.
This commit is contained in:
parent
fd8b9e6daf
commit
e03461819c
@ -8,7 +8,7 @@ type PackageName = Name
|
||||
|
||||
-- | Metadata for a package (name and version).
|
||||
data PackageInfo = PackageInfo
|
||||
{ packageName :: Maybe PackageName
|
||||
{ packageName :: PackageName
|
||||
, packageVersion :: Maybe Version
|
||||
}
|
||||
deriving (Eq, Ord, Show)
|
||||
|
@ -186,7 +186,7 @@ parseFiles :: Parser term -> [FilePath] -> IO [Module term]
|
||||
parseFiles parser paths = traverse (parseFile parser (Just (dropFileName (head paths)))) paths
|
||||
|
||||
parsePackage :: PackageName -> Parser term -> [FilePath] -> IO (Package term)
|
||||
parsePackage name parser files = Package (PackageInfo (Just name) Nothing) . Package.fromModules <$> parseFiles parser files
|
||||
parsePackage name parser files = Package (PackageInfo name Nothing) . Package.fromModules <$> parseFiles parser files
|
||||
|
||||
|
||||
-- Read a file from the filesystem into a Blob.
|
||||
|
Loading…
Reference in New Issue
Block a user