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

compiler crash with (phantom type + extensible record + type alias) #1916

Open
rlefevre opened this issue Mar 21, 2019 · 0 comments
Open

compiler crash with (phantom type + extensible record + type alias) #1916

rlefevre opened this issue Mar 21, 2019 · 0 comments

Comments

@rlefevre
Copy link
Member

rlefevre commented Mar 21, 2019

The following SSCCE always leads to Map.!: given key is not an element in the map with Elm 0.19.0, even without the --debug option, and from a clean cache and elm-stuff state:

module Sscce exposing (bug)


type Value r
    = Value


type alias Bug r =
    Value { r | field : () } -> ()


bug : Bug {}
bug Value =
    ()

Example from a clean state:

$ elm make Sscce.elm
Starting downloads...

  ● elm/time 1.0.0
  ● elm/core 1.0.2
  ● elm/url 1.0.0
  ● elm/virtual-dom 1.0.2
  ● elm/html 1.0.0
  ● elm/json 1.1.3
  ● elm/browser 1.0.1

Dependencies ready!
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

Building again does not solve the issue.

@evancz evancz changed the title SSCCE: Map.!: given key... without --debug, cache or elm-stuff compiler crash with (phantom type + extensible record + type alias) Jul 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants