@@ -10,6 +10,7 @@ import qualified Data.ByteString.Lazy as BS
10import qualified Data.HashMap.Strict as Map
10import qualified Data.HashMap.Strict as Map
11import qualified Elm.Internal.Name as N
11import qualified Elm.Internal.Name as N
12import qualified Elm.Internal.Version as V
12import qualified Elm.Internal.Version as V
13+import qualified Elm.Internal.Paths as Path
14data Deps = Deps
15data Deps = Deps
15 { name :: N.Name
16 { name :: N.Name
@@ -47,10 +48,6 @@ instance FromJSON Deps where
47 Right nm -> return nm
48 Right nm -> return nm
49 exposed <- get obj "exposed-modules" "a list of modules exposed to users"
50 exposed <- get obj "exposed-modules" "a list of modules exposed to users"
50− when (null exposed) $
51− fail "there are no 'exposed-modules'.\n\
52− \At least one module must be exposed \
53− \for anyone to use this library!"
55 elmVersion <- get obj "elm-version" "the version of the Elm compiler you are using"
52 elmVersion <- get obj "elm-version" "the version of the Elm compiler you are using"
@@ -76,7 +73,8 @@ get obj field desc =
76 case maybe of
73 case maybe of
77 Just value -> return value
74 Just value -> return value
78 Nothing -> fail $ "Missing field " ++ show field ++ ", " ++ desc ++ ".\n" ++
75 Nothing -> fail $ "Missing field " ++ show field ++ ", " ++ desc ++ ".\n" ++
76+ " Check out an example " ++ Path.dependencyFile ++ " file here:" ++
79− " <https://github.com/evancz/rainbow-palette/blob/master/elm_dependencies.json>"
77+ " <https://github.com/evancz/automaton/blob/master/elm_dependencies.json>"
81repoToName :: String -> Either String N.Name
79repoToName :: String -> Either String N.Name
82repoToName repo
80repoToName repo