@@ -119,7 +119,7 @@ initToReport exit =
121 InitSolverProblem solver ->
121 InitSolverProblem solver ->
122− error "TODO InitSolverProblem" solver
122+ toSolverReport solver
124 InitAlreadyExists ->
124 InitAlreadyExists ->
125 Help.report "EXISTING PROJECT" Nothing
125 Help.report "EXISTING PROJECT" Nothing
@@ -801,7 +801,7 @@ installToReport exit =
801 error "TODO InstallNoOfflineSolution"
801 error "TODO InstallNoOfflineSolution"
803 InstallHadSolverTrouble solver ->
803 InstallHadSolverTrouble solver ->
804− error "TODO InstallHadSolverTrouble" solver
804+ toSolverReport solver
806 InstallUnknownPackageOnline pkg suggestions ->
806 InstallUnknownPackageOnline pkg suggestions ->
807 Help.docReport "UNKNOWN PACKAGE" Nothing
807 Help.docReport "UNKNOWN PACKAGE" Nothing
@@ -873,8 +873,44 @@ installToReport exit =
874data Solver
874data Solver
875 = SolverBadCacheData Pkg.Name V.Version
875 = SolverBadCacheData Pkg.Name V.Version
876− | SolverBadHttpData Pkg.Name V.Version
876+ | SolverBadHttpData Pkg.Name V.Version String
877− | SolverBadHttp Http.Error
877+ | SolverBadHttp Pkg.Name V.Version Http.Error
880+toSolverReport :: Solver -> Help.Report
881+toSolverReport problem =
883+ SolverBadCacheData pkg vsn ->
884+ Help.report "PROBLEM SOLVING PACKAGE CONSTRAINTS" Nothing
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!"
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."
896+ SolverBadHttpData pkg vsn url ->
897+ Help.report "PROBLEM SOLVING PACKAGE CONSTRAINTS" Nothing
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:"
903+ [ D.indent 4 $ D.dullyellow $ D.fromChars url
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?"
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"
@@ -1192,8 +1228,8 @@ toDetailsReport details =
1195− DetailsSolverProblem _ ->
1231+ DetailsSolverProblem solver ->
1196− error "TODO DetailsSolverProblem"
1232+ toSolverReport solver
1198 DetailsBadElmInPkg constraint ->
1234 DetailsBadElmInPkg constraint ->
1199 Help.report "ELM VERSION MISMATCH" (Just "elm.json")
1235 Help.report "ELM VERSION MISMATCH" (Just "elm.json")