Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upReplace "constant" by "input" where appropriate #125
Conversation
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Like this? |
jvoigtlaender
added some commits
Jan 22, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jvoigtlaender
Jan 22, 2015
Contributor
Corresponding changes are still to be done in Http.js, Keyboard.js, and WebSockets.js, but due to expected merge conflicts it does not make sense to go at these before https://github.com/elm-lang/core/pull/127 has been integrated into master.
|
Corresponding changes are still to be done in |
jvoigtlaender
added some commits
Jan 22, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jvoigtlaender
Jan 22, 2015
Contributor
That should be it.
There are still calls to Signal.constant from JS here: https://github.com/jvoigtlaender/core/blob/constant-to-input/src/Native/Runtime.js#L289 and here: https://github.com/jvoigtlaender/core/blob/constant-to-input/src/Native/Time.js#L59. But at least the latter is really also "semantically" meant to be a constant signal. I'm not sure about the former occurrence in Runtime.js.
|
That should be it. There are still calls to |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jvoigtlaender
Jan 22, 2015
Contributor
Actually, the occurrence of Signal.constant at https://github.com/jvoigtlaender/core/blob/constant-to-input/src/Native/Runtime.js#L289 should probably be replaced by Native.Signal.input, as well as the occurrence of Signal.constant here: https://github.com/elm-lang/elm-reactor/blob/60b8dca16d5ba4a95a6a2aafe7d89a5a207639d6/frontend/debugger-implementation.js#L729.
|
Actually, the occurrence of |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
evancz
Jan 22, 2015
Member
Yeah, I think that's fine. It feels a little weird to be importing both Signal and Native.Signal though, that's my one hesitation. Do you have an opinion about whether what the right thing is here?
|
Yeah, I think that's fine. It feels a little weird to be importing both |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
evancz
Jan 22, 2015
Member
Oops, I commented but had not refreshed the page, so I did not see any of the comments from today! I'll review again now!
|
Oops, I commented but had not refreshed the page, so I did not see any of the comments from today! I'll review again now! |
pushed a commit
that referenced
this pull request
Jan 22, 2015
evancz
merged commit 29c6f52
into
elm:master
Jan 22, 2015
1 check passed
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
evancz
Jan 22, 2015
Member
Everything looks good. I'd be sort of inclined to use Native.Signal for all of the map needs, but I'm not sure if that's a good idea or if it really matters.
|
Everything looks good. I'd be sort of inclined to use |
jvoigtlaender
deleted the
jvoigtlaender:constant-to-input
branch
Jan 22, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jvoigtlaender
Jan 22, 2015
Contributor
Oh, right, I hadn't noticed that most of the remaining Signal use is for Signal.map, and Signal.map is just an indirection to Native.Signal.map. So yes, one could avoid a bunch of indirections here. I'll not touch this, though.
But I'll do PRs to replace the constant uses at https://github.com/elm-lang/core/blob/master/src/Native/Runtime.js#L289 and https://github.com/elm-lang/elm-reactor/blob/60b8dca16d5ba4a95a6a2aafe7d89a5a207639d6/frontend/debugger-implementation.js#L729, because these are signals that will get updates.
|
Oh, right, I hadn't noticed that most of the remaining But I'll do PRs to replace the |
This was referenced Jan 22, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jvoigtlaender
Jan 22, 2015
Contributor
I take these back. In those places, when those signals are created, they are actually constant. (Because it's for cases like where main : Element is artifically made a main : Signal Element.)
|
I take these back. In those places, when those signals are created, they are actually constant. (Because it's for cases like where |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
evancz
Jan 22, 2015
Member
Yeah, I agree, constant makes sense in those cases. We'll save map for another time, when we are feeling more decisive :)
Thanks a ton for improving this!
|
Yeah, I agree, Thanks a ton for improving this! |
jvoigtlaender commentedJan 21, 2015
No description provided.