@@ -555,7 +555,8 @@ publishToReport publish =
555 ++ V.toChars new ++ " really does come next"
555 ++ V.toChars new ++ " really does come next"
557 PublishCannotRegister httpError ->
557 PublishCannotRegister httpError ->
558− error "TODO PublishCannotRegister" httpError
558+ toHttpErrorReport "PROBLEM PUBLISHING PACKAGE" httpError $
559+ "I need to send information about your package to the package website"
560 PublishNoGit ->
561 PublishNoGit ->
561 Help.report "NO GIT" Nothing
562 Help.report "NO GIT" Nothing
@@ -676,8 +677,8 @@ data Install
676 | InstallNoOnlineSolution
677 | InstallNoOnlineSolution
677 | InstallNoOfflineSolution
678 | InstallNoOfflineSolution
678 | InstallHadSolverTrouble Solver
679 | InstallHadSolverTrouble Solver
679− | InstallUnknownPackageOnline [Pkg.Name]
680+ | InstallUnknownPackageOnline Pkg.Name [Pkg.Name]
680− | InstallUnknownPackageOffline [Pkg.Name]
681+ | InstallUnknownPackageOffline Pkg.Name [Pkg.Name]
681 | InstallHasBadDetails Details
682 | InstallHasBadDetails Details
@@ -730,11 +731,33 @@ installToReport exit =
730 InstallHadSolverTrouble solver ->
731 InstallHadSolverTrouble solver ->
731 error "TODO InstallHadSolverTrouble" solver
732 error "TODO InstallHadSolverTrouble" solver
733− InstallUnknownPackageOnline suggestions ->
734+ InstallUnknownPackageOnline pkg suggestions ->
734− error "TODO InstallUnknownPackageOnline" suggestions
735+ Help.docReport "UNKNOWN PACKAGE" Nothing
738+ ["I","cannot","find","a","package","named",D.red (D.fromPackage pkg) <> "."]
741+ "I looked through https://package.elm-lang.org for packages with similar names\
743+ , D.indent 4 $ D.dullyellow $ D.vcat $ map D.fromPackage suggestions
744+ , D.reflow $ "Maybe you want one of these instead?"
736− InstallUnknownPackageOffline suggestions ->
747+ InstallUnknownPackageOffline pkg suggestions ->
737− error "TODO InstallUnknownPackageOffline" suggestions
748+ Help.docReport "UNKNOWN PACKAGE" Nothing
751+ ["I","cannot","find","a","package","named",D.red (D.fromPackage pkg) <> "."]
754+ "I could not connect to https://package.elm-lang.org though, so new packages may\
755+ \ have been published since I last updated my local cache of package names."
757+ "Looking through the locally cached names, the closest ones are:"
758+ , D.indent 4 $ D.dullyellow $ D.vcat $ map D.fromPackage suggestions
759+ , D.reflow $ "Maybe you want one of these instead?"
739 InstallHasBadDetails _ ->
762 InstallHasBadDetails _ ->
740 error "TODO InstallHasBadDetails"
763 error "TODO InstallHasBadDetails"