You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the Dict (List Int) a data type in a project, and I came across cases when Dict.get doesn't find entries when --optimize is enabled. I was not able to isolate this into an SSCCE (it seems to only show up after the dictionary is manipulated throughout an algorithm), so attaching screenshots from the project instead:
If I use Dict.get when accessing coordinates for tree nodes, the package draws the following incomplete tree (entry with the key of [] is not found):
However, if I replace Dict.get with a method where I'm inefficiently finding the key where the lists-of-ints match up:
I realize that this is an incredibly obscure edge case, but it took me several months to narrow it down to Dict.get, during which time I couldn't use the optimize flag for a large app. Could save someone else some time on this in the future, even if it's just documented here.
The text was updated successfully, but these errors were encountered:
peterszerzo
changed the title
Dict.get works unreliably when keys are arrays and --optimize is enabled
Dict.get works unreliably when keys are lists and --optimize is enabled
Jan 21, 2019
I am using the
Dict (List Int) a
data type in a project, and I came across cases whenDict.get
doesn't find entries when--optimize
is enabled. I was not able to isolate this into an SSCCE (it seems to only show up after the dictionary is manipulated throughout an algorithm), so attaching screenshots from the project instead:If I use

Dict.get
when accessing coordinates for tree nodes, the package draws the following incomplete tree (entry with the key of[]
is not found):However, if I replace
Dict.get
with a method where I'm inefficiently finding the key where the lists-of-ints match up:then I get the expected result:
I realize that this is an incredibly obscure edge case, but it took me several months to narrow it down to
Dict.get
, during which time I couldn't use the optimize flag for a large app. Could save someone else some time on this in the future, even if it's just documented here.The text was updated successfully, but these errors were encountered: