@@ -240,6 +240,7 @@ read path =
241 Right project@(Pkg (PkgInfo _ _ _ _ _ deps tests _)) ->
241 Right project@(Pkg (PkgInfo _ _ _ _ _ deps tests _)) ->
242 do checkOverlap "dependencies" "test-dependencies" deps tests
242 do checkOverlap "dependencies" "test-dependencies" deps tests
243 return project
244 return project
245 Right project@(App (AppInfo _ srcDirs deps tests trans)) ->
246 Right project@(App (AppInfo _ srcDirs deps tests trans)) ->
@@ -247,6 +248,7 @@ read path =
247 checkOverlap "dependencies" "transitive-dependencies" deps trans
248 checkOverlap "dependencies" "transitive-dependencies" deps trans
248 checkOverlap "test-dependencies" "transitive-dependencies" tests trans
249 checkOverlap "test-dependencies" "transitive-dependencies" tests trans
249 mapM_ doesDirectoryExist srcDirs
250 mapM_ doesDirectoryExist srcDirs
251+ appHasCoreAndJson (Map.union deps trans)
250 return project
252 return project
@@ -273,6 +275,25 @@ doesDirectoryExist dir =
273 else throwBadJson (E.BadSrcDir dir)
275 else throwBadJson (E.BadSrcDir dir)
278+appHasCoreAndJson :: Map Name a -> Task.Task ()
279+appHasCoreAndJson pkgs =
280+ if Map.member Pkg.core pkgs then
282+ if Map.member Pkg.json pkgs
284+ else throwBadJson E.NoAppJson
287+ throwBadJson E.NoAppCore
290+pkgHasCore :: Map Name a -> Task.Task ()
292+ if Map.member Pkg.core pkgs
294+ else throwBadJson E.NoPkgCore
277-- JSON DECODE
298-- JSON DECODE