@@ -138,7 +138,7 @@ foreignError name direction rootType localType problemMessage =
138138 , P.nest 4 (PP.pretty localType) <> P.text "\n"
139139 , txt [ "Acceptable values for foreign ", wire, "s include:" ]
140140 , txt [ " Ints, Floats, Bools, Strings, Maybes, Lists, Arrays, Tuples, unit values," ]
141− , txt [ " Json.Values, ", dir "" "first-order functions, promises, ", "and concrete records." ]
141+ , txt [ " Json.Values, ", dir "" "first-order functions, commands, ", "and concrete records." ]
142142 ]
143143 ]
144144 where
@@ -179,16 +179,16 @@ input name maybeExpr tipe =
179179 case ST.deepDealias tipe of
180180 ST.App (ST.Type signal) [ ST.App (ST.Type result) [failure,success] ]
181181 | Var.isStream signal && Var.isResult result ->
182− let promise =
183− Var.fromModule ["Promise"] "Promise"
184− promiseType =
185− ST.App (ST.Type signal) [ ST.App (ST.Type promise) [failure,success] ]
182+ let command =
183+ Var.fromModule ["Command"] "Command"
184+ commandType =
185+ ST.App (ST.Type signal) [ ST.App (ST.Type command) [failure,success] ]
186186 in
187− return (D.Promise name promiseType expr tipe)
187+ return (D.Command name commandType expr tipe)
188188
189189 _ ->
190190 throw $ inputError name tipe $
191− [ P.text "An input that runs promises must be a stream of results."
191+ [ P.text "An input that runs commands must be a stream of results."
192192 , P.text "Something like the following:\n"
193193 , P.text " Stream (Result Http.Error String)"
194194 , P.text " Stream (Result x ())"