on master help sign in
Update changelog for recent decisions
commita378254e632cc71b6b1815b23a8419532f6c3fcb authorEvan Czaplicki <info@elm-lang.org> dateMon 16 Mar 2015, 12:34 (12 years ago) parentea0d6b1
1 file changed+25−16
changelog.md+25−16
changelog.md+25−16
@@ -40,37 +40,46 @@ defaults.
4040
4141One common confusion with the `port` syntax is that the only difference
4242between incoming ports and outgoing ports is whether the type annotation comes
43−with a definition. To make things a bit clearer, each case is getting a
44−keyword.
43+with a definition. To make things a bit clearer, we are using the keywords
44+`foreign input` and `foreign output`.
4545
4646```elm
47−input dbResults : Stream String
47+foreign input dbResults : Stream String
4848
49−output dbRequests : Stream String
50−output dbRequests =
49+foreign output dbRequests : Stream String
50+foreign output dbRequests =
5151 Stream.map toRequest userNames
5252```
5353
54−### Loopbacks
54+### Input / Output
5555
56−The biggest change in 0.15 is the addition of promises. To bring this concept
57−into Elm in a nice way, we needed to give it support at the declaration level.
58−There are two ways to specify loopbacks. First is a loopback that you write to
59−manually.
56+The biggest change in 0.15 is the addition of tasks, allowing us to represent
57+arbitrary effects in Elm in a safe way. This parallels how ports work, so we
58+are trying to draw attention to that in syntax. First addition is a way to
59+create new inputs to an Elm program.
6060
6161```elm
62−loopback actions : Mailbox Action
62+input actions : Input Action
6363```
6464
65−This creates a `Mailbox` that you can send messages to. The second kind of
66−loopback runs promises, so it gets all of its values from a stream of promises.
65+This creates a `Input` that is made up of an `Address` you can send messages to
66+and a `Stream` of those messages. This is similar to a `foreign input` except
67+there we use the name as the address. The second addition is a way to run
68+tasks.
6769
6870```elm
69−loopback dbResults : Stream (Result Http.Error String)
70−loopback dbResults <-
71− Stream.map toRequest userNames
71+output Stream.map toRequest userNames
7272```
7373
74+This lets us turn tasks into effects in the world. Sometimes it is useful to
75+pipe the results of these tasks back into Elm. For that, we have the third and
76+final addition.
77+
78+```elm
79+input results : Stream (Result Http.Error String)
80+input results from
81+ Stream.map toRequest userNames
82+```
7483
7584# 0.14.1
7685