I was surprised when running some unit tests to run across the error message
Just (Dict.fromList [("x",5),("y",8)],[],[13]) == Just (Dict.fromList [(
"x",5),("y",8)],[],[13]): FAILED. Expected: Just (Dict.fromList [("x",5),(
"y",8)],[],[13]); got: Just (Dict.fromList [("x",5),("y",8)],[],[13])
Naturally I figured this means dictionaries should be tested for equality
in Elm, so I looked at the docs.
On http://package.elm-lang.org/packages/elm-lang/core/4.0.3/Dict nothing
was made of dictionaries being "non-eq types". HOWEVER if you go back to
the Core version 4.0.1
(http://package.elm-lang.org/packages/elm-lang/core/4.0.1/Dict) we see
"Insert, remove, and query operations all take *O(log n)* time. Dictionary
equality with (==)is unreliable and should not be used."
How do I know what version of the core libraries I have? My system tells me
I have Elm 0.17.1. Is that not the latest? I install from Homebrew.
Did the == problem get fixed in 4.0.3?
Thanks
--
You received this message because you are subscribed to the Google Groups "Elm
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.