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

Graphics.Element.layers fails with an empty list #5

Closed
rehno-lindeque opened this Issue Nov 17, 2014 · 1 comment

Comments

Projects
None yet
2 participants
@rehno-lindeque
Contributor

rehno-lindeque commented Nov 17, 2014

The program

main = layers []

...produces an exception...

Function 'foldl1' expects a non-empty list!

...due to the two calls to List.maximum over here: https://github.com/elm-lang/core/blob/53aef4887e668a5732ffff1ad0560bab779e8674/src/Graphics/Element.elm#L330

@jvoigtlaender

This comment has been minimized.

Show comment
Hide comment
@jvoigtlaender

jvoigtlaender Aug 31, 2015

Contributor

This got fixed at some point. The two calls of List.maximum now return Maybes and are wrapped in withDefaults.

Contributor

jvoigtlaender commented Aug 31, 2015

This got fixed at some point. The two calls of List.maximum now return Maybes and are wrapped in withDefaults.

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