New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial value of Keyboard.presses is shown as <internal structure> #362

Closed
grzegorzbalcerek opened this Issue Aug 21, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@grzegorzbalcerek

grzegorzbalcerek commented Aug 21, 2015

Consider the following program:

module KeyboardSignals2 where


import Graphics.Element exposing (show)
import Keyboard
import Signal exposing ((<~))


main = show <~ Keyboard.presses

It shows:

 <internal structure>

initially. Only after pressing a key, it shows its code. But, shouldn't a signal always have a value consistent with its data type?

@jvoigtlaender

This comment has been minimized.

Show comment
Hide comment
@jvoigtlaender

jvoigtlaender Aug 21, 2015

Contributor

Fixed by https://github.com/elm-lang/core/pull/363.

But note that by using Keyboard.presses you are in for further trouble: https://github.com/elm-lang/core/issues/326

Contributor

jvoigtlaender commented Aug 21, 2015

Fixed by https://github.com/elm-lang/core/pull/363.

But note that by using Keyboard.presses you are in for further trouble: https://github.com/elm-lang/core/issues/326

@evancz evancz closed this in #363 Aug 21, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment