on master help sign in
Update changelog for recent decisions
a378254Evan Czaplicki
changelog.md+25−16
@@ -40,37 +40,46 @@ defaults.
40
40
41One common confusion with the `port` syntax is that the only difference
41One common confusion with the `port` syntax is that the only difference
42between incoming ports and outgoing ports is whether the type annotation comes
42between 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
43+with a definition. To make things a bit clearer, we are using the keywords
44−keyword.
44+`foreign input` and `foreign output`.
45
45
46```elm
46```elm
47−input dbResults : Stream String
47+foreign input dbResults : Stream String
48
48
49−output dbRequests : Stream String
49+foreign output dbRequests : Stream String
50−output dbRequests =
50+foreign output dbRequests =
51 Stream.map toRequest userNames
51 Stream.map toRequest userNames
52```
52```
53
53
54−### Loopbacks
54+### Input / Output
55
55
56−The biggest change in 0.15 is the addition of promises. To bring this concept
56+The biggest change in 0.15 is the addition of tasks, allowing us to represent
57−into Elm in a nice way, we needed to give it support at the declaration level.
57+arbitrary effects in Elm in a safe way. This parallels how ports work, so we
58−There are two ways to specify loopbacks. First is a loopback that you write to
58+are trying to draw attention to that in syntax. First addition is a way to
59−manually.
59+create new inputs to an Elm program.
60
60
61```elm
61```elm
62−loopback actions : Mailbox Action
62+input actions : Input Action
63```
63```
64
64
65−This creates a `Mailbox` that you can send messages to. The second kind of
65+This creates a `Input` that is made up of an `Address` you can send messages to
66−loopback runs promises, so it gets all of its values from a stream of promises.
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.
67
69
68```elm
70```elm
69−loopback dbResults : Stream (Result Http.Error String)
70−loopback dbResults <-
71− Stream.map toRequest userNames
71+output Stream.map toRequest userNames
72```
72```
73
73
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+```
74
83
75# 0.14.1
84# 0.14.1
76
85