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

Basics.toString leads to runtime error on Html values #488

Closed
berndca opened this Issue Jan 18, 2016 · 3 comments

Comments

Projects
None yet
2 participants
@berndca

berndca commented Jan 18, 2016

I'm getting a TypeError exception for the following code:

import Html exposing (p, text) 
import Debug

main = Debug.log "test" (p [] [ text "42"])

09:08:01.084 TypeError: invalid 'in' operand v
Elm.Native.Utils.make/toString() everything.js:2270
Elm.Native.Utils.make/toString() everything.js:2364
log() everything.js:6168
A2() everything.js:1842
Elm.Main.make/view() compile:24
Elm.Main.make() compile:25
init() everything.js:1383
Elm.fullscreen() everything.js:1266
<anonymous> compile:27
1 everything.js:2270:1
@jvoigtlaender

This comment has been minimized.

Show comment
Hide comment
@jvoigtlaender

jvoigtlaender Jan 18, 2016

Contributor

The error is unrelated to Debug.log. As evidence, it happens as well for this code:

import Html exposing (p, text) 
import Graphics.Element

main = Graphics.Element.show (p [] [ text "42"])

The culprit is the implementation of Native.Utils.toString, which both Debug.log and Graphics.Element.show are using.

Contributor

jvoigtlaender commented Jan 18, 2016

The error is unrelated to Debug.log. As evidence, it happens as well for this code:

import Html exposing (p, text) 
import Graphics.Element

main = Graphics.Element.show (p [] [ text "42"])

The culprit is the implementation of Native.Utils.toString, which both Debug.log and Graphics.Element.show are using.

@jvoigtlaender jvoigtlaender changed the title from Debug.log runtime error to Basics.toString leads to runtime error on Html values Jan 18, 2016

@jvoigtlaender

This comment has been minimized.

Show comment
Hide comment
@jvoigtlaender

jvoigtlaender Jan 19, 2016

Contributor

#183 might fix this.

Contributor

jvoigtlaender commented Jan 19, 2016

#183 might fix this.

@jvoigtlaender

This comment has been minimized.

Show comment
Hide comment
@jvoigtlaender

jvoigtlaender Jun 27, 2016

Contributor

This is fixed in Elm 0.17.

Contributor

jvoigtlaender commented Jun 27, 2016

This is fixed in Elm 0.17.

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