@@ -119,7 +119,7 @@ initToReport exit =
119119 ]
120120
121121 InitSolverProblem solver ->
122− error "TODO InitSolverProblem" solver
122+ toSolverReport solver
123123
124124 InitAlreadyExists ->
125125 Help.report "EXISTING PROJECT" Nothing
@@ -801,7 +801,7 @@ installToReport exit =
801801 error "TODO InstallNoOfflineSolution"
802802
803803 InstallHadSolverTrouble solver ->
804− error "TODO InstallHadSolverTrouble" solver
804+ toSolverReport solver
805805
806806 InstallUnknownPackageOnline pkg suggestions ->
807807 Help.docReport "UNKNOWN PACKAGE" Nothing
@@ -873,8 +873,44 @@ installToReport exit =
873873
874874data Solver
875875 = SolverBadCacheData Pkg.Name V.Version
876− | SolverBadHttpData Pkg.Name V.Version
877− | SolverBadHttp Http.Error
876+ | SolverBadHttpData Pkg.Name V.Version String
877+ | SolverBadHttp Pkg.Name V.Version Http.Error
878+
879+
880+toSolverReport :: Solver -> Help.Report
881+toSolverReport problem =
882+ case problem of
883+ SolverBadCacheData pkg vsn ->
884+ Help.report "PROBLEM SOLVING PACKAGE CONSTRAINTS" Nothing
885+ (
886+ "I need the elm.json of " ++ Pkg.toChars pkg ++ " " ++ V.toChars vsn ++ " to\
887+ \ help me search for a set of compatible packages. I had it cached locally, but\
888+ \ it looks like the file was corrupted!"
889+ )
890+ [ D.reflow $
891+ "I deleted the cached version, so the next run should download a fresh copy.\
892+ \ Hopefully that will get you unstuck, but it will not resolve the root\
893+ \ problem if a 3rd party tool is modifing cached files for some reason."
894+ ]
895+
896+ SolverBadHttpData pkg vsn url ->
897+ Help.report "PROBLEM SOLVING PACKAGE CONSTRAINTS" Nothing
898+ (
899+ "I need the elm.json of " ++ Pkg.toChars pkg ++ " " ++ V.toChars vsn ++ " to\
900+ \ help me search for a set of compatible packages, but I ran into corrupted\
901+ \ information from:"
902+ )
903+ [ D.indent 4 $ D.dullyellow $ D.fromChars url
904+ , D.reflow $
905+ "Is something weird with your internet connection. We have gotten reports that\
906+ \ schools, businesses, airports, etc. sometimes intercept requests and add things\
907+ \ to the body or change its contents entirely. Could that be the problem?"
908+ ]
909+
910+ SolverBadHttp pkg vsn httpError ->
911+ toHttpErrorReport "PROBLEM SOLVING PACKAGE CONSTRAINTS" httpError $
912+ "I need the elm.json of " ++ Pkg.toChars pkg ++ " " ++ V.toChars vsn
913+ ++ " to help me search for a set of compatible packages"
878914
879915
880916
@@ -1192,8 +1228,8 @@ toDetailsReport details =
11921228 ]
11931229 ]
11941230
1195− DetailsSolverProblem _ ->
1196− error "TODO DetailsSolverProblem"
1231+ DetailsSolverProblem solver ->
1232+ toSolverReport solver
11971233
11981234 DetailsBadElmInPkg constraint ->
11991235 Help.report "ELM VERSION MISMATCH" (Just "elm.json")