1
1
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:
Rob Rix 2018-04-02 17:35:33 -04:00
parent fd8b9e6daf
commit e03461819c
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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.