Skip to content
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

Map.! error when having Array in message #1861

Closed
samuelpilz opened this issue Nov 27, 2018 · 1 comment
Closed

Map.! error when having Array in message #1861

samuelpilz opened this issue Nov 27, 2018 · 1 comment

Comments

@samuelpilz
Copy link

samuelpilz commented Nov 27, 2018

This adds another report for #1851. The message is an array. Below is a minimal code example

module Main exposing (main)

import Array exposing (Array)
import Browser
import Html


main : Program () Int (Array Int)
main =
    Browser.element
        { init = \_ -> ( 0, Cmd.none )
        , update = \_ m -> ( m, Cmd.none )
        , view = \_ -> Html.div [] []
        , subscriptions = \_ -> Sub.none
        }
$ elm --version
0.19.0
$ elm make Main.elm --debug
Success! Compiled 1 module.                                          
elm: Map.!: given key is not an element in the map
CallStack (from HasCallStack):
  error, called at ./Data/Map/Internal.hs:610:17 in containers-0.5.11.0-K2TDqgYtGUcKxAY1UqVZ3R:Data.Map.Internal
$ elm make Main.elm
Success! Compiled 1 module. 

The elm.json was not edited.

It is notable that Ellie app has trouble with this error: https://ellie-app.com/3ZNMV93LMjFa1. Compilation succeeds but a runtime error is thrown.

@samuelpilz
Copy link
Author

Closing, in favor of #1864

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant