From ac6c5bc04a0d32db82e90d3a95daf03646fb8554 Mon Sep 17 00:00:00 2001 From: Evan Czaplicki Date: Thu, 19 Dec 2013 01:48:26 -0800 Subject: [PATCH] Get rid of check on how many exposed modules. That's for validation elsewhere --- compiler/Elm/Internal/Dependencies.hs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/compiler/Elm/Internal/Dependencies.hs b/compiler/Elm/Internal/Dependencies.hs index b2528e1..fc3eaf4 100644 --- a/compiler/Elm/Internal/Dependencies.hs +++ b/compiler/Elm/Internal/Dependencies.hs @@ -10,6 +10,7 @@ import qualified Data.ByteString.Lazy as BS import qualified Data.HashMap.Strict as Map import qualified Elm.Internal.Name as N import qualified Elm.Internal.Version as V +import qualified Elm.Internal.Paths as Path data Deps = Deps { name :: N.Name @@ -47,10 +48,6 @@ instance FromJSON Deps where Right nm -> return nm exposed <- get obj "exposed-modules" "a list of modules exposed to users" - when (null exposed) $ - fail "there are no 'exposed-modules'.\n\ - \At least one module must be exposed \ - \for anyone to use this library!" elmVersion <- get obj "elm-version" "the version of the Elm compiler you are using" @@ -76,7 +73,8 @@ get obj field desc = case maybe of Just value -> return value Nothing -> fail $ "Missing field " ++ show field ++ ", " ++ desc ++ ".\n" ++ - " " + " Check out an example " ++ Path.dependencyFile ++ " file here:" ++ + " " repoToName :: String -> Either String N.Name repoToName repo