@@ -138,7 +138,7 @@ foreignError name direction rootType localType problemMessage =
138 , P.nest 4 (PP.pretty localType) <> P.text "\n"
138 , P.nest 4 (PP.pretty localType) <> P.text "\n"
139 , txt [ "Acceptable values for foreign ", wire, "s include:" ]
139 , txt [ "Acceptable values for foreign ", wire, "s include:" ]
140 , txt [ " Ints, Floats, Bools, Strings, Maybes, Lists, Arrays, Tuples, unit values," ]
140 , 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." ]
@@ -179,16 +179,16 @@ input name maybeExpr tipe =
179 case ST.deepDealias tipe of
179 case ST.deepDealias tipe of
180 ST.App (ST.Type signal) [ ST.App (ST.Type result) [failure,success] ]
180 ST.App (ST.Type signal) [ ST.App (ST.Type result) [failure,success] ]
181 | Var.isStream signal && Var.isResult result ->
181 | Var.isStream signal && Var.isResult result ->
182− let promise =
182+ let command =
183− Var.fromModule ["Promise"] "Promise"
183+ Var.fromModule ["Command"] "Command"
184− promiseType =
184+ commandType =
185− ST.App (ST.Type signal) [ ST.App (ST.Type promise) [failure,success] ]
185+ ST.App (ST.Type signal) [ ST.App (ST.Type command) [failure,success] ]
187− return (D.Promise name promiseType expr tipe)
187+ return (D.Command name commandType expr tipe)
190 throw $ inputError name tipe $
190 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."
192 , P.text "Something like the following:\n"
192 , P.text "Something like the following:\n"
193 , P.text " Stream (Result Http.Error String)"
193 , P.text " Stream (Result Http.Error String)"
194 , P.text " Stream (Result x ())"
194 , P.text " Stream (Result x ())"