From e03461819c1b20d923506f446597aa24395ae6b6 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Mon, 2 Apr 2018 17:35:33 -0400 Subject: [PATCH] packageName is mandatory. --- src/Data/Abstract/Package.hs | 2 +- src/Semantic/Util.hs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Data/Abstract/Package.hs b/src/Data/Abstract/Package.hs index cfce53e92..701249565 100644 --- a/src/Data/Abstract/Package.hs +++ b/src/Data/Abstract/Package.hs @@ -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) diff --git a/src/Semantic/Util.hs b/src/Semantic/Util.hs index 80721255b..9b8b5af4a 100644 --- a/src/Semantic/Util.hs +++ b/src/Semantic/Util.hs @@ -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.