@@ -641,6 +641,9 @@ data Solver
641641data Outline
642642 = OutlineHasBadStructure (Decode.Error OutlineProblem)
643643 | OutlineHasBadSrcDirs FilePath [FilePath]
644+ | OutlineNoPkgCore
645+ | OutlineNoAppCore
646+ | OutlineNoAppJson
644647
645648
646649data OutlineProblem
@@ -908,12 +911,47 @@ makeToReport make =
908911toOutlineReport :: Outline -> Help.Report
909912toOutlineReport problem =
910913 case problem of
911− OutlineHasBadSrcDirs dir dirs ->
912− error "TODO OutlineHasBadSrcDirs" dir dirs
913−
914914 OutlineHasBadStructure decodeError ->
915915 error "TODO OutlineHasBadStructure" decodeError toOutlineProblemReport
916916
917+ OutlineHasBadSrcDirs dir dirs ->
918+ case dirs of
919+ [] ->
920+ Help.report "MISSING SOURCE DIRECTORY" (Just "elm.json")
921+ "The \"source-directories\" in your elm.json lists the following directory:"
922+ [ D.indent 4 $ D.dullyellow $ D.fromChars dir
923+ , D.reflow $
924+ "I cannot find it though. Is it missing? Is there a typo?"
925+ ]
926+
927+ _:_ ->
928+ Help.report "MISSING SOURCE DIRECTORIES" (Just "elm.json")
929+ "The \"source-directories\" in your elm.json lists the following directories:"
930+ [ D.indent 4 $ D.dullyellow $ D.fromChars dir
931+ , D.reflow $
932+ "I cannot find them though. Are they missing? Are there typos?"
933+ ]
934+
935+ OutlineNoPkgCore ->
936+ Help.report "MISSING DEPENDENCY" (Just "elm.json")
937+ "A package must have \"elm/core\" as a dependency. Try running:"
938+ [ D.indent 4 $ D.green $ "elm install elm/core"
939+ , D.reflow "I need it for the default imports that make `List` and `Maybe` available."
940+ ]
941+
942+ OutlineNoAppCore ->
943+ Help.report "MISSING DEPENDENCY" (Just "elm.json")
944+ "An application must have \"elm/core\" as a dependency. Try running:"
945+ [ D.indent 4 $ D.green $ "elm install elm/core"
946+ , D.reflow "It has some supporting code that is needed by every Elm application!"
947+ ]
948+
949+ OutlineNoAppJson ->
950+ Help.report "MISSING DEPENDENCY" (Just "elm.json")
951+ "An application must have \"elm/json\" as a dependency. Try running:"
952+ [ D.indent 4 $ D.green $ "elm install elm/json"
953+ , D.reflow "It helps me handle flags and ports."
954+ ]
917955
918956toOutlineProblemReport :: OutlineProblem -> Help.Report
919957toOutlineProblemReport problem =