@@ -147,22 +147,34 @@ initToReport exit =
147147
148148
149149data Diff
150− = DiffApplication
150+ = DiffNoOutline
151+ | DiffApplication
151152 | DiffUnpublished
152153 | DiffUnknownPackage Pkg.Name [Pkg.Name]
153154 | DiffUnknownVersion Pkg.Name V.Version [V.Version]
154− | DiffCannotFindDocs DocsProblem
155− | DiffMustHaveLatestRegistry RegistryProblem
155+ | DiffDocsProblem DocsProblem
156+ | DiffBadRegistry RegistryProblem
157+ | DiffBadDetails Details
156158
157159
158160diffToReport :: Diff -> Help.Report
159161diffToReport diff =
160162 case diff of
163+ DiffNoOutline ->
164+ Help.report "DIFF WHAT?" Nothing
165+ "I cannot find an elm.json so I am not sure what you want me to diff.\
166+ \ Normally you run `elm diff` from within a project!"
167+ [ D.reflow $ "If you are just curious to see a diff, try running this command:"
168+ , D.indent 4 $ D.green $ "elm diff elm/html 5.1.1 6.0.0"
169+ ]
170+
161171 DiffApplication ->
162172 Help.report "CANNOT DIFF APPLICATIONS" Nothing
163− "I cannot perform diffs on applications, only packages! If you are\
164− \ just curious to see a diff, try running this command:"
165− [ D.indent 4 $ D.green $ "elm diff elm/html 5.1.1 6.0.0"
173+ "It looks like you are running `elm diff` on an application, but it\
174+ \ only makes sense for packages that have been published. That way\
175+ \ there is a fixed API to diff against."
176+ [ D.reflow $ "If you are just curious to see a diff, try running this command:"
177+ , D.indent 4 $ D.green $ "elm diff elm/html 5.1.1 6.0.0"
166178 ]
167179
168180 DiffUnpublished ->
@@ -198,11 +210,11 @@ diffToReport diff =
198210 , "Want one of those instead?"
199211 ]
200212
201− DiffCannotFindDocs problem ->
202− error "TODO DiffCannotFindDocs" problem
213+ DiffDocsProblem problem ->
214+ error "TODO DiffDocsProblem" problem
203215
204− DiffMustHaveLatestRegistry problem ->
205− error "TODO DiffMustHaveLatestRegistry" problem
216+ DiffBadRegistry problem ->
217+ error "TODO DiffBadRegistry" problem
206218
207219
208220