@@ -70,18 +70,10 @@ attemptElmJsonChange root oldProject toString changes =
7070 do liftIO $ putStrLn "It is already installed!"
7171
7272 PromoteTest newProject ->
73− attempt newProject $ D.vcat $
74− [ "I found it in your elm.json file!"
75− , "In \"test-dependencies\" though."
76− , "Should I move it into \"dependencies\" for more general use? [Y/n]: "
77− ]
73+ attempt newProject $ requestPromotion "\"test-dependencies\""
7874
7975 PromoteTrans newProject ->
80− attempt newProject $ D.vcat $
81− [ "I found it in your elm.json file!"
82− , "In \"transitive-dependencies\" though."
83− , "Should I move it into \"dependencies\" for more general use? [Y/n]: "
84− ]
76+ attempt newProject $ requestPromotion "\"transitive-dependencies\""
8577
8678 Changes changeDict newProject ->
8779 let
@@ -96,6 +88,20 @@ attemptElmJsonChange root oldProject toString changes =
9688 ]
9789
9890
91+requestPromotion :: D.Doc -> D.Doc
92+requestPromotion theWrongPlace =
93+ D.vcat
94+ [ D.fillSep
95+ ["I","found","it","in","your","elm.json","file!"
96+ ,"In",D.dullyellow theWrongPlace,"though."
97+ ]
98+ , D.fillSep
99+ ["Should","I","move","it","into",D.green "\"dependencies\""
100+ ,"for","more","general","use?","[Y/n]: "
101+ ]
102+ ]
103+
104+
99105
100106-- MAKE PLANS
101107