@@ -555,7 +555,8 @@ publishToReport publish =
555555 ++ V.toChars new ++ " really does come next"
556556
557557 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"
559560
560561 PublishNoGit ->
561562 Help.report "NO GIT" Nothing
@@ -676,8 +677,8 @@ data Install
676677 | InstallNoOnlineSolution
677678 | InstallNoOfflineSolution
678679 | InstallHadSolverTrouble Solver
679− | InstallUnknownPackageOnline [Pkg.Name]
680− | InstallUnknownPackageOffline [Pkg.Name]
680+ | InstallUnknownPackageOnline Pkg.Name [Pkg.Name]
681+ | InstallUnknownPackageOffline Pkg.Name [Pkg.Name]
681682 | InstallHasBadDetails Details
682683
683684
@@ -730,11 +731,33 @@ installToReport exit =
730731 InstallHadSolverTrouble solver ->
731732 error "TODO InstallHadSolverTrouble" solver
732733
733− InstallUnknownPackageOnline suggestions ->
734− error "TODO InstallUnknownPackageOnline" suggestions
734+ InstallUnknownPackageOnline pkg suggestions ->
735+ Help.docReport "UNKNOWN PACKAGE" Nothing
736+ (
737+ D.fillSep
738+ ["I","cannot","find","a","package","named",D.red (D.fromPackage pkg) <> "."]
739+ )
740+ [ D.reflow $
741+ "I looked through https://package.elm-lang.org for packages with similar names\
742+ \ and found these:"
743+ , D.indent 4 $ D.dullyellow $ D.vcat $ map D.fromPackage suggestions
744+ , D.reflow $ "Maybe you want one of these instead?"
745+ ]
735746
736− InstallUnknownPackageOffline suggestions ->
737− error "TODO InstallUnknownPackageOffline" suggestions
747+ InstallUnknownPackageOffline pkg suggestions ->
748+ Help.docReport "UNKNOWN PACKAGE" Nothing
749+ (
750+ D.fillSep
751+ ["I","cannot","find","a","package","named",D.red (D.fromPackage pkg) <> "."]
752+ )
753+ [ D.reflow $
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."
756+ , D.reflow $
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?"
760+ ]
738761
739762 InstallHasBadDetails _ ->
740763 error "TODO InstallHasBadDetails"